Hello there.
I hope somebody with proper C++ knowledge is here as well, because now I need 
to utilize that knowledge for a moment.

I have hacked my way so far to write - for experimenting - a php interpreter, 
using my ph7 module. I went further, and now integrated that said module into 
the nodejs binary - and now i can use it. So calling ‚./node script.php‘ will 
now pick up _third_party_main.js, which contains statements to run the 
specified file.

However, now I want to go a bit further, and implement a —lang switch, to 
switch between nodejs and ph7. The logic for that is not hard. but i have a 
problem: v8 seems to consume every argument before the script name. So I am now 
lookign at node.cc->node::Start(). I see that they’re somewhat worked with, but 
as I don’t know the v8 and uv init functions very well, I can’t digg where to 
change the way argv is moved into the process object. So, to be specific, I am 
looking at this passage:


  // Hack aroung with the argv pointer. Used for process.title = "blah".
  argv = uv_setup_args(argc, argv);

  // Logic to duplicate argv as Init() modifies arguments
  // that are passed into it.
  char **argv_copy = copy_argv(argc, argv);

  // This needs to run *before* V8::Initialize()
  // Use copy here as to not modify the original argv:
  Init(argc, argv_copy);

  V8::Initialize();
  {
    Locker locker;
    HandleScope handle_scope;

    // Create the one and only Context.
    Persistent<Context> context = Context::New();
    Context::Scope context_scope(context);

    // Use original argv, as we're just copying values out of it.
    Handle<Object> process_l = SetupProcessObject(argc, argv);
    v8_typed_array::AttachBindings(context->Global());


I have changed ParseArgs and commented out a few of the switches - such as -e 
and such - to disable them. Now, I just want to push the full argv into the 
process object. But, where and how do I do that??

Kind regards, Ingwie

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to