Skip to content

SVCD::subscribe [NOT READY] #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed

Conversation

eldon
Copy link

@eldon eldon commented Feb 28, 2015

Implemented subscribe function in C.

lua_pushnumber(L, 2530);
lua_call(L, 4, 0);
lua_pushnumber(L, ivkid);
return 0;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should return the number of results (1 in this case).

men in #000000

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you removed SVCD before constructing your message and sending it & wasn't sure if you could do that.

Sincerely, Running with Scissors

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed return value

@jenniferdai
Copy link

lua_getfield(L, -1, "ivkid");
I might be misunderstanding, but I thought L, -1 gets the first parameter, but ivkid is the second parameter?

-team birdpeople

@mccormickt12
Copy link

@jenniferdai the -1 is referring to the placement of the table being indexed to by "ivkid", so it should be fine

-TBD

lua_getfield(L, -1, "ivkid");

uint16_t ivkid = luaL_checkinteger(L, -1);
lua_pop(L, 1);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit-picking, but I don't think you need to do this per se. Can't you just leave this on the stack and have it cleaned up later?

  • PB for your Jelly or, The Perfect Storm

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to stack cleanup to the lua call machinery

@immesys immesys changed the title Svcd subscribe SVCD::subscribe Mar 2, 2015
@immesys immesys changed the title SVCD::subscribe SVCD::subscribe [NOT READY] Mar 2, 2015
@nikitakit
Copy link
Contributor

See #45 for the revised version

@immesys
Copy link
Contributor

immesys commented Mar 2, 2015

superseded by #45

@immesys immesys closed this Mar 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants