From ace9784ea7b9d52e711dc8e4f37c27a282d545a8 Mon Sep 17 00:00:00 2001 From: Ezequiel Garcia Date: Tue, 11 Jun 2013 10:16:53 -0300 Subject: example.api: Replace string object initialization The object initialization relies on the API function: Jim_InitStringRep(), yet this function has been removed by this commit. commit 2e8b9ddb92ed1cea3054ed8180d363c9dcc72dd9 Author: Steve Bennett Date: Sat Feb 18 14:47:11 2012 +1000 Small cleanup/optimisation in object create/dup (BTW, it's not very clean to remove an API function and not even specify that in the commit message). Signed-off-by: Ezequiel Garcia --- examples.api/jim_obj.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'examples.api') diff --git a/examples.api/jim_obj.c b/examples.api/jim_obj.c index 607ef7c..91d1e84 100644 --- a/examples.api/jim_obj.c +++ b/examples.api/jim_obj.c @@ -56,12 +56,8 @@ main(int argc, char **argv) /* And initialise any static extensions */ Jim_InitStaticExtensions(interp); - - /* Create some empty object */ - obj = Jim_NewObj(interp); - - /* Name the object */ - Jim_InitStringRep(obj, OBJ_DESC, strlen(OBJ_DESC)) ; + /* Create a string object */ + obj = Jim_NewStringObj(interp, OBJ_DESC, strlen(OBJ_DESC)); /* Obtain internal representation of an object */ obj_desc = Jim_GetString(obj, &obj_size); -- cgit v1.1