diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-04-26 00:38:44 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-04-26 00:38:44 +0000 |
| commit | 449ed9836b65dc942d380badd664507bbcd6baaf (patch) | |
| tree | 2fde9c8a27be9bdc53e5ac3658c226b35ac3e334 /eval.c | |
| parent | da0c4aa4bcf3d4f06d40d4a656d19d558718051d (diff) | |
| download | ruby-449ed9836b65dc942d380badd664507bbcd6baaf.tar.gz ruby-449ed9836b65dc942d380badd664507bbcd6baaf.tar.xz ruby-449ed9836b65dc942d380badd664507bbcd6baaf.zip | |
* eval.c (rb_proc_new): make Proc from C function. [new]
* intern.h (rb_proc_new): prototype.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
| -rw-r--r-- | eval.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -6998,6 +6998,14 @@ umcall(args, method) return umethod_call(0, 0, method); } +VALUE +rb_proc_new(func, val) + VALUE (*func)(ANYARGS); /* VALUE yieldarg[, VALUE procarg] */ + VALUE val; +{ + return rb_iterate((VALUE(*)_((VALUE)))mproc, 0, func, val); +} + static VALUE method_proc(method) VALUE method; |
