History

Make array length helper public.

Tor Andersson committed 12 years ago

Commit 9f7141c1 parent 759d6092 files · +4 −2Browse files

Showing the changes to jsarray.c (1 of 2 files). Show all

Unified · Split

jsarray.c+2−2
@@ -2,7 +2,7 @@ · 1 unmodified line
2#include "jsvalue.h"2#include "jsvalue.h"
3#include "jsbuiltin.h"3#include "jsbuiltin.h"
4 4
5static unsigned int js_getlength(js_State *J, int idx)5unsigned int js_getlength(js_State *J, int idx)
6{6{
7 unsigned int len;7 unsigned int len;
8 js_getproperty(J, idx, "length");8 js_getproperty(J, idx, "length");
@@ -11,7 +11,7 @@ static unsigned int js_getlength(js_State *J, int idx) · 2 unmodified lines
11 return len;11 return len;
12}12}
13 13
14static void js_setlength(js_State *J, int idx, unsigned int len)14void js_setlength(js_State *J, int idx, unsigned int len)
15{15{
16 js_pushnumber(J, len);16 js_pushnumber(J, len);
17 js_setproperty(J, idx, "length");17 js_setproperty(J, idx, "length");

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t