Skip to content

Instantly share code, notes, and snippets.

View kubo's full-sized avatar

Kubo Takehiro kubo

  • Japan
View GitHub Profile
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <dpi.h>
static dpiContext *g_context;
#define chkerr(func) do { \
if ((func) < 0) { \
dpiErrorInfo err; \
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#include <dpi.h>
static dpiContext *g_context;
#ifndef ARRAY_SIZE
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
/* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
#include <stdio.h>
#include <dlfcn.h>
#include <link.h>
typedef struct OCIEnv OCIEnv;
typedef unsigned int ub4;
typedef int (*OCIEnvCreate_t)(OCIEnv **envp, ub4 mode, void *ctxp,
void *(*malocfp)(void *ctxp, size_t size),
@kubo
kubo / 01-mtime-subsec.dif
Last active July 1, 2017 02:52
https://github.com/oneclick/rubyinstaller2/issues/52 Apply 01-mtime-subsec.dif and then 02-file-utime.dif
diff --git a/dir.c b/dir.c
index 3db196f..426d0b6 100644
--- a/dir.c
+++ b/dir.c
@@ -1300,9 +1300,9 @@ to_be_ignored(int e)
}
#ifdef _WIN32
-#define STAT(p, s) rb_w32_ustati64((p), (s))
+#define STAT(p, s) rb_w32_ustati64ns((p), (s))
@kubo
kubo / select-number.c
Created February 13, 2017 13:35
ODPI-C issue
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <dpi.h>
static dpiContext *gContext = NULL;
#define CHK_WITH_ERR(func, err) do { \
int rv = (func); \
if (rv < 0) { \
diff --git a/src/hot_patch.cc b/src/hot_patch.cc
index 5e4d7f2..759bcaf 100644
--- a/src/hot_patch.cc
+++ b/src/hot_patch.cc
@@ -279,6 +279,23 @@ static bool HookFunction(ULONG_PTR targetFunction, ULONG_PTR newFunction, ULONG_
if (ud_obj.mnemonic == UD_Ijmp || ud_obj.mnemonic == UD_Icall ||
ud_obj.operand[0].type == UD_OP_JIMM)
{
+#ifdef __i386__
+ const BYTE *pc = (const BYTE *)targetFunction + InstrSize;
diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c
index 2de46e4..b10507e 100644
--- a/ext/oci8/oci8.c
+++ b/ext/oci8/oci8.c
@@ -134,6 +134,11 @@ static void oci8_svcctx_init(oci8_base_t *base)
oci8_svcctx_t *svcctx = (oci8_svcctx_t *)base;
VALUE obj;
+#ifdef NATIVE_THREAD_WITH_GVL
+ svcctx->waiters.next = &svcctx->waiters;
@kubo
kubo / geometry-sample.rb
Last active December 10, 2015 09:39
This is sample code to bind GeoRuby objects as SDO_GEOMETRY datatype. See: https://github.com/rsim/oracle-enhanced/pull/268
require 'oci8'
require 'geo_ruby'
module OCI8::Object::Mdsys
class SdoGeometry < OCI8::Object::Base
set_typename('MDSYS.SDO_GEOMETRY')
end
end
class OCI8::BindType::GeoRuby < OCI8::BindType::Object
diff --git a/VERSION b/VERSION
index eca07e4..fb94c56 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.1.2
+2.1.2.1
diff --git a/ext/oci8/lob.c b/ext/oci8/lob.c
index 4289a3a..d18a539 100644
--- a/ext/oci8/lob.c
diff --git a/ChangeLog b/ChangeLog
index 73e1c10..5ca1e38 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2012-10-26 KUBO Takehiro <kubo@jiubao.org>
+ * ext/oci8/lob.c, ext/oci8/oci8.c, ext/oci8/oci8.h, ext/oci8/oci8lib.c:
+ Fix github issue #20
+
2012-04-28 KUBO Takehiro <kubo@jiubao.org>