| 112 | } |
| 113 | |
| 114 | static int Document_set(lua_State* L) { |
| 115 | Document* doc = Userdata<Document>::check(L, 1); |
| 116 | Pointer ptr(luaL_checkstring(L, 2)); |
| 117 | Value v = values::toValue(L, 3, doc->GetAllocator()); |
| 118 | |
| 119 | ptr.Set(*doc, v, doc->GetAllocator()); |
| 120 | |
| 121 | return 0; |
| 122 | } |
| 123 | |
| 124 | /** |
| 125 | * local jsonstr = doc:stringify({pretty=false}) |