This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */ | |
#include <stdio.h> | |
#include <libcouchbase/couchbase.h> | |
#include <libcouchbase/api3.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <stdint.h> | |
#ifdef _WIN32 | |
#define PRIu64 "I64u" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <thread> | |
#include "libcouchbase/couchbase.h" | |
static void opCallback(lcb_t instance, int cbtype, const lcb_RESPBASE *rb) { | |
if (rb->rc != LCB_SUCCESS) { | |
fprintf(stderr, "%s\n", lcb_strerror(NULL, rb->rc)); | |
} else { | |
if (cbtype == LCB_CALLBACK_GET) { | |
const lcb_RESPGET *rg = (const lcb_RESPGET *)rb; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <thread> | |
#include "libcouchbase/couchbase.h" | |
static void opCallback(lcb_t instance, int cbtype, const lcb_RESPBASE *rb) { | |
if (rb->rc != LCB_SUCCESS) { | |
fprintf(stderr, "%s\n", lcb_strerror(NULL, rb->rc)); | |
} else { | |
if (cbtype == LCB_CALLBACK_GET) { | |
const lcb_RESPGET *rg = (const lcb_RESPGET *)rb; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -Nru couchbase-2.2.4/couchbase.c couchbase-2.2.4.orig/couchbase.c | |
--- couchbase-2.2.4/couchbase.c 2016-12-26 21:29:05.000000000 +0200 | |
+++ couchbase-2.2.4.orig/couchbase.c 2017-02-01 19:33:27.771468268 +0200 | |
@@ -94,7 +94,7 @@ | |
static void php_extname_init_globals(zend_couchbase_globals *couchbase_globals) | |
{ | |
-#ifdef COMPILE_DL_COUCHBASE && defined(ZTS) | |
+#if defined(COMPILE_DL_COUCHBASE) && defined(ZTS) | |
ZEND_TSRMLS_CACHE_UPDATE(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am avsej on github. | |
* I am avsej (https://keybase.io/avsej) on keybase. | |
* I have a public key whose fingerprint is C904 2380 904C 3CA2 8D7C EED4 B8C5 2427 872C F7D3 | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x = Object.new | |
def x.instance_variable_get(*) | |
return nil | |
end | |
x.instance_variable_set(:@foo, 'x') | |
x.instance_variable_get(:@foo) # => nil | |
x.instance_eval("@foo") # => "x" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'active_record' | |
require 'sqlite3' | |
require 'squeel' | |
ActiveRecord::Base.establish_connection(:adapter => 'sqlite3', :database => 'test.db') | |
ActiveRecord::Base.connection.tap do |c| # !> `&' interpreted as argument prefix | |
c.create_table(:posts, force: true) do |t| # !> method redefined; discarding old eval_scope | |
t.string :title | |
t.text :body |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'active_record' | |
require 'sqlite3' | |
require 'squeel' | |
ActiveRecord::Base.establish_connection(:adapter => 'sqlite3', :database => 'test.db') | |
ActiveRecord::Base.connection.tap do |c| # !> `&' interpreted as argument prefix | |
c.create_table(:posts, force: true) do |t| # !> method redefined; discarding old eval_scope | |
t.string :title | |
t.text :body |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; This buffer is for notes you don't want to save, and for Lisp evaluation. | |
;; If you want to create a file, visit that file with C-x C-f, | |
;; then enter the text in that file's own buffer. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; This buffer is for notes you don't want to save, and for Lisp evaluation. | |
;; If you want to create a file, visit that file with C-x C-f, | |
;; then enter the text in that file's own buffer. | |
NewerOlder