summaryrefslogtreecommitdiff
path: root/README.EXT
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-09-20 23:20:58 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-09-20 23:20:58 +0000
commit7f249811e10c4871f3150a46c603083f733a9e9c (patch)
tree9fdf54123837b40d727fbef3c33410758e480448 /README.EXT
parent898c734378ddb060152660fd58a91505351bc1a9 (diff)
* README.EXT, README.EXT.ja: add new features.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'README.EXT')
-rw-r--r--README.EXT21
1 files changed, 19 insertions, 2 deletions
diff --git a/README.EXT b/README.EXT
index d479737..80ac978 100644
--- a/README.EXT
+++ b/README.EXT
@@ -295,6 +295,15 @@ To define alias to the method,
void rb_define_alias(VALUE module, const char* new, const char* old);
+To define and undefine the `allocate' class method,
+
+ void rb_define_alloc_func(VALUE klass, VALUE (*func)(VALUE klass));
+ void rb_undef_alloc_func(VALUE klass);
+
+func have to take the klass as the argument and return a newly
+allocated instance. This instance should be empty as possible,
+without any expensive (including external) resources.
+
2.1.3 Constant definition
We have 2 functions to define constants:
@@ -612,8 +621,14 @@ various conditions.
The value of the variables below will affect the Makefile.
- $CFLAGS: included in CFLAGS make variable (such as -I)
+ $CFLAGS: included in CFLAGS make variable (such as -O)
+ $CPPFLAGS: included in CPPFLAGS make variable (such as -I, -D)
$LDFLAGS: included in LDFLAGS make variable (such as -L)
+ $objs: list of object file names
+
+In normal, object files list is automatically generated by searching
+source files, but you need directs them explicitly if any sources will
+be generated while building.
If a compilation condition is not fulfilled, you should not call
``create_makefile''. The Makefile will not generated, compilation will
@@ -771,7 +786,9 @@ NUM2INT(value)
INT2NUM(i)
NUM2DBL(value)
rb_float_new(f)
-STR2CSTR(value)
+StringValue(value)
+StringValuePtr(value)
+StringValueCStr(value)
rb_str_new2(s)
** defining class/module