Bug #8077

Returning Dir objects from C extensions

Added by Andre Nathan about 1 year ago. Updated 7 months ago.

[ruby-core:53322]
Status:Feedback
Priority:Normal
Assignee:-
Category:ext
Target version:next minor
ruby -v:1.9.3p194 Backport:

Description

In 1.8 it was possible to return Dir objects from C extensions by mimicking the code in dir.c and using DataWrapStruct(rbcDir, dirmark, dirfree, dirp). This doesn't work in 1.9+, so it would be nice to have the Dir methods exposed to C extensions. For example, something like "VALUE rbdir_new(DIR *)".

History

#1 Updated by Nobuyoshi Nakada about 1 year ago

  • Category set to ext
  • Status changed from Open to Feedback
  • Target version set to next minor

For what purpose?

#2 Updated by Andre Nathan about 1 year ago

The code I'm working with is wrapping the fdopendir(3) function (return a DIR* from a file descriptor). This is currently not possible except in ruby 1.8.

#3 Updated by Andre Nathan 7 months ago

Any chance of this going ahead?

Also available in: Atom PDF