Reply to topic  [ 2 posts ] 
Cannot push twice in on_extract (yo_cupdate expected oxy...) 
Author Message
Yorick Master

Joined: Tue Mar 07, 2006 10:31 pm
Posts: 125
Location: Meudon, France
Post Cannot push twice in on_extract (yo_cupdate expected oxy...)
Hi,

I recently wanted to implement an on_extract method for an opaque object. When I push more than one value one the stack, on_extract fails with
Quote:
ERROR (*main*) (BUG) yo_cupdate expected oxy_context
In addition, the return value seems to be not the last value pushed, but the one before.

I attach a minimal example where one can see that on_eval works as expected but on_extract fails:
Attachment:
File comment: Minimal example
foo.tgz [1.5 KiB]
Downloaded 170 times
The two function are identical (except for their signature of course):
Code:
void foo_extract(void * obj, char * member)
{
  ypush_long(1);
  ypush_long(2);
}

The failure is the same whatever I push (nil, longs, strings etc.).

For my purpose I found a simple workaround (I can drop each item before I push the next one) but I thought you would be interested.

Kind regards, Thibaut.


Fri Apr 19, 2013 8:15 am
Profile WWW
Yorick Master

Joined: Mon Nov 22, 2004 9:43 am
Posts: 354
Location: Livermore, CA, USA
Post Re: Cannot push twice in on_extract (yo_cupdate expected oxy
Commit a66b1c1 at github.com/dhmunro/yorick fixes this.

Thank you very much. This was a serious stack mis-positioning error.


Fri May 17, 2013 9:37 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.