[MacRuby-devel] Using 'Pointer.new_with_type'

Michael Winterstein parzival at mindspring.com
Thu Feb 5 10:53:44 PST 2009


Hi all,

Is there a particular framework that's required in order to use  
'Pointer.new_with_type'?

I'm using the trunk (build 809) and it's apparently not available in  
either my Xcode project or in macirb.

Is there an alternative method for working with pointers?



My specific case is that I want to call the C function mkstemp.
Is this what I should be doing? :

@tmpfInfo += "/"+"resynch.fileinfo.XXXXXX"	
tmptr = Pointer.new_with_type('*')
tmptr.assign(@tmpfInfo)
fd_tmpInfo = mkstemp(tmptr)
tmpInfoFileHandle = NSFileHandle.initWithFileDescriptor(@fd_tmpInfo)

Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20090205/59987898/attachment.html>


More information about the MacRuby-devel mailing list