Skip to content

Instantly share code, notes, and snippets.

View felipensp's full-sized avatar
🏠
Working from home

Felipe Pena felipensp

🏠
Working from home
View GitHub Profile
@felipensp
felipensp / bulk.cs
Created October 23, 2015 11:13
Oracle bulk insert for Dapper .NET
private static int OracleBulkExecuteImpl<T>(this IDbConnection cnn, ref CommandDefinition command)
{
object param = command.Parameters;
IEnumerable multiExec = GetMultiExec(param);
Identity identity;
CacheInfo info = null;
if (multiExec != null)
{
int total = 0;
bool wasClosed = cnn.State == ConnectionState.Closed;
@felipensp
felipensp / gist:1982941
Created March 6, 2012 02:20
pygment scanner
# -*- coding: utf-8 -*-
"""
pygments.lexers.clever
~~~~~~~~~~~~~~~~~~~~~
Lexer for Clever programming language
Written by Clever Team
"""
diff --cc Makefile
index 87aa54d,7135b9e..0000000
--- Makefile
+++ Makefile
@@@ -40,15 -42,15 +40,15 @@@ ifneq (,$(findstring MINGW,$(UNAME))
OBJECTS=$(BUILDDIR)parser.o $(BUILDDIR)scanner.o $(BUILDDIR)driver.o \
$(BUILDDIR)cstring.o $(BUILDDIR)double.o $(BUILDDIR)std_pkg.o \
$(BUILDDIR)int.o $(BUILDDIR)io.o $(BUILDDIR)math.o \
- $(BUILDDIR)pkgmanager.o $(BUILDDIR)compiler.o \
+ $(BUILDDIR)file.o $(BUILDDIR)filestream.o $(BUILDDIR)pkgmanager.o $(BUILDDIR)compiler.o \
#!parrot
.loadlib 'io_ops'
.sub main :main
.param pmc argv
$S0 = shift argv
.local int argc
argc = elements argv
if argc > 0 goto L1
diff --git a/compilers/imcc/imcc.l b/compilers/imcc/imcc.l
index 92631e2..7b01b74 100644
--- a/compilers/imcc/imcc.l
+++ b/compilers/imcc/imcc.l
@@ -1351,8 +1351,8 @@ imcc_cleanup_input(ARGMOD(imc_info_t * imcc), PIOHANDLE file,
{
if (is_file)
PIO_CLOSE(imcc->interp, file);
- else
- Parrot_str_free_cstring(source_c);