[Win32utils-devel] Getting at MakeOpenFile

Berger, Daniel Daniel.Berger at qwest.com
Thu Jun 1 10:03:03 EDT 2006


> -----Original Message-----
> From: win32utils-devel-bounces at rubyforge.org 
> [mailto:win32utils-devel-bounces at rubyforge.org] On Behalf Of 
> Wayne Vucenic
> Sent: Wednesday, May 31, 2006 4:05 PM
> To: Development and ideas for win32utils projects
> Subject: Re: [Win32utils-devel] Getting at MakeOpenFile
> 
> 
> Hi Dan,
> 
> How's it going?
> 
> Regarding MakeOpenFile... looking in 
> C:\ruby\lib\ruby\1.8\i386-mswin32\rubyio.h, its defined as a macro:
> 
> #define MakeOpenFile(obj, fp) do {\
>     if (RFILE(obj)->fptr) {\
> 	rb_io_close(obj);\
> 	free(RFILE(obj)->fptr);\
> 	RFILE(obj)->fptr = 0;\
>     }\
>     fp = 0;\
>     fp = RFILE(obj)->fptr = ALLOC(OpenFile);\
>     fp->f = fp->f2 = NULL;\
>     fp->mode = 0;\
>     fp->pid = 0;\
>     fp->lineno = 0;\
>     fp->path = NULL;\
>     fp->finalize = 0;\
> } while (0)
> 
> so the only way to access it would be to #include "rubyio.h", 
> which doesn't help much for your pure Ruby solution.
> 
> Wayne

Ah, yes.  It just doesn't look like win32-open3 is a good candidate for
a pure Ruby version.  I've posted a shared object built with VC++ 6 on
the project page, courtesy of Heesob.

Regards,

Dan


This communication is the property of Qwest and may contain confidential or
privileged information. Unauthorized use of this communication is strictly 
prohibited and may be unlawful.  If you have received this communication 
in error, please immediately notify the sender by reply e-mail and destroy 
all copies of the communication and any attachments.


More information about the win32utils-devel mailing list