Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: [OT]: How to do fileno() and Win32::APIFile::FdGetOsFHandle() in C

by Steve_p (Priest)
on Dec 14, 2006 at 19:24 UTC ( #589903=note: print w/replies, xml ) Need Help??


in reply to [OT]: How to do fileno() and Win32::APIFile::FdGetOsFHandle() in C

To see how fileno() in Perl works, take a quick look at the pp_fileno() function in pp_sys.c in the Perl source code. Assuming your filehandle isn't tied, the steps basically are:

  1. Get the IO from the Perl filehandle passed in (or use the IO if that's what you got)
  2. Get the FILE pointer from the IO
  3. Pass the FILE pointer to fileno() to get your file descriptor.

Now, to get at Win32API::File::FdGetOsFHandle(), grep around the win32/ subdirectory for your answers. I'm afraid my Win32 skills aren't good enough to help you there.


Test your modules with bleadperl!

  rsync -avz rsync://public.activestate.com/perl-current/ .
  ./Configure -des -Dusedevel -Dprefix=/path/to/test/perl
  make test
  make install

Now, please test you modules! If you have test failures that don't happen with Perl 5.8.8, send a simplified test case to

perlbug at perl.org

  • Comment on Re: [OT]: How to do fileno() and Win32::APIFile::FdGetOsFHandle() in C
  • Download Code

Replies are listed 'Best First'.
Re^2: [OT]: How to do fileno() and Win32::APIFile::FdGetOsFHandle() in C
by ikegami (Pope) on Dec 14, 2006 at 19:46 UTC
    FdGetOsFHandle is simply ( system call MS C lib function ) _get_osfhandle.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://589903]
help
Chatterbox?
[Corion]: Once more, I'm looking for a sane client-side framework, but I guess these don't exist. Everything I look at either uses a weirdo home-grown templating language (like Angular in all its incarnations) or uses weirdo Javascript incarnations (like ...
[Corion]: ... Inferno.js, which uses ES2015) or uses some horrible amount of Javascript infrastructure before you can even render a single file.
[Corion]: I'd really like to create a dynamic frontend for my Google Keep clone, but so far, all the templating solutions seem to bring their own template language or require me to hand-code everything in (their own flavour of) Javascript. I'd like something ...
[Corion]: ... that can use templates from the HTML (via <script language="text/ template">... my template ...</script> and otherwise gets out of my way. But it seems that is not how the Javascript world is, currently :-/
[Corion]: I guess my question is, has anybody worked with React, Ember, Angular (v2, v4, v.whatever) or any other JS client-side dynamic rendering/virtual DOM thingie and found a simple, single-file solution like jQuery?

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (10)
As of 2017-03-27 19:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (321 votes). Check out past polls.