Skip to content

Managing Ruby 1.9 and 1.8 C extension compatibility in one header file

Notifications You must be signed in to change notification settings

banister/compat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Compat

(c) John Mair (banisterfiend); MIT License.

Manages Ruby 1.9 and 1.8 compatibility in a single header file

Features

  • Detects version based on existence of ROBJECT_EMBED_LEN_MAX macro
  • Defines RCLASS_M_TBL / RCLASS_SUPER / RCLASS_IV_TBL for 1.8
  • Automatically includes st.h
  • Creates a create_class(VALUE flags, VALUE klass) function to manage creation in both versions
  • Defines a KLASS_OF(obj) macro, (lvalue version of CLASS_OF)
  • Defines FALSE and TRUE macros

About

Managing Ruby 1.9 and 1.8 C extension compatibility in one header file

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages