Skip to content

Instantly share code, notes, and snippets.

require 'fiddle'
require 'fiddle/import'
module GVL
include Fiddle
extend Importer
dlload Handle::DEFAULT
T = import_function 'rb_thread_call_without_gvl', TYPE_VOIDP,
require 'fiddle'
class GVL
handle = Fiddle::Handle::DEFAULT
address = handle['rb_thread_blocking_region']
func = Fiddle::Function.new address, [Fiddle::TYPE_VOIDP,
Fiddle::TYPE_VOIDP,
Fiddle::TYPE_VOIDP,
Fiddle::TYPE_VOIDP], Fiddle::TYPE_VOIDP
#!/usr/bin/env node
/*
* Parsing BIG compressed data with Node.js and SAX
* Probably some bugs, but worked fine for OpenStreetMap Great Britain bz2
* Greg Miell 2012
*/
// Simple string trim prototype extension
String.prototype.trim = function() {