Просмотр исходного кода

ncd: NCDObject: remove unused functions

ambrop7 13 лет назад
Родитель
Сommit
b2e53909ac
2 измененных файлов с 0 добавлено и 46 удалено
  1. 0 44
      ncd/NCDObject.c
  2. 0 2
      ncd/NCDObject.h

+ 0 - 44
ncd/NCDObject.c

@@ -108,26 +108,6 @@ static NCDObject dig_into_object (NCDObject object)
     return object;
     return object;
 }
 }
 
 
-int NCDObject_ResolveObjExpr (NCDObject *o, char **names, NCDObject *out_object)
-{
-    ASSERT(names)
-    ASSERT(out_object)
-    
-    NCDObject object = dig_into_object(*o);
-    
-    for (size_t i = 0; names[i]; i++) {
-        NCDObject obj2;
-        if (!NCDObject_GetObj(&object, names[i], &obj2)) {
-            return 0;
-        }
-        
-        object = dig_into_object(obj2);
-    }
-    
-    *out_object = object;
-    return 1;
-}
-
 int NCDObject_ResolveObjExprCompact (NCDObject *o, const char *names, size_t num_names, NCDObject *out_object)
 int NCDObject_ResolveObjExprCompact (NCDObject *o, const char *names, size_t num_names, NCDObject *out_object)
 {
 {
     ASSERT(num_names == 0 || names)
     ASSERT(num_names == 0 || names)
@@ -152,30 +132,6 @@ int NCDObject_ResolveObjExprCompact (NCDObject *o, const char *names, size_t num
     return 1;
     return 1;
 }
 }
 
 
-int NCDObject_ResolveVarExpr (NCDObject *o, char **names, NCDValMem *mem, NCDValRef *out_value)
-{
-    ASSERT(names)
-    ASSERT(mem)
-    ASSERT(out_value)
-    
-    NCDObject object = dig_into_object(*o);
-    
-    for (size_t i = 0; names[i]; i++) {
-        NCDObject obj2;
-        if (!NCDObject_GetObj(&object, names[i], &obj2)) {
-            if (!names[i + 1] && NCDObject_GetVar(&object, names[i], mem, out_value)) {
-                return 1;
-            }
-            
-            return 0;
-        }
-        
-        object = dig_into_object(obj2);
-    }
-    
-    return NCDObject_GetVar(&object, "", mem, out_value);
-}
-
 int NCDObject_ResolveVarExprCompact (NCDObject *o, const char *names, size_t num_names, NCDValMem *mem, NCDValRef *out_value)
 int NCDObject_ResolveVarExprCompact (NCDObject *o, const char *names, size_t num_names, NCDValMem *mem, NCDValRef *out_value)
 {
 {
     ASSERT(num_names == 0 || names)
     ASSERT(num_names == 0 || names)

+ 0 - 2
ncd/NCDObject.h

@@ -59,9 +59,7 @@ NCDObject NCDObject_Build2 (const char *type, void *user, void *user2, NCDObject
 const char * NCDObject_Type (NCDObject *o);
 const char * NCDObject_Type (NCDObject *o);
 int NCDObject_GetObj (NCDObject *o, const char *name, NCDObject *out_object) WARN_UNUSED;
 int NCDObject_GetObj (NCDObject *o, const char *name, NCDObject *out_object) WARN_UNUSED;
 int NCDObject_GetVar (NCDObject *o, const char *name, NCDValMem *mem, NCDValRef *out_value) WARN_UNUSED;
 int NCDObject_GetVar (NCDObject *o, const char *name, NCDValMem *mem, NCDValRef *out_value) WARN_UNUSED;
-int NCDObject_ResolveObjExpr (NCDObject *o, char **names, NCDObject *out_object) WARN_UNUSED;
 int NCDObject_ResolveObjExprCompact (NCDObject *o, const char *names, size_t num_names, NCDObject *out_object) WARN_UNUSED;
 int NCDObject_ResolveObjExprCompact (NCDObject *o, const char *names, size_t num_names, NCDObject *out_object) WARN_UNUSED;
-int NCDObject_ResolveVarExpr (NCDObject *o, char **names, NCDValMem *mem, NCDValRef *out_value) WARN_UNUSED;
 int NCDObject_ResolveVarExprCompact (NCDObject *o, const char *names, size_t num_names, NCDValMem *mem, NCDValRef *out_value) WARN_UNUSED;
 int NCDObject_ResolveVarExprCompact (NCDObject *o, const char *names, size_t num_names, NCDValMem *mem, NCDValRef *out_value) WARN_UNUSED;
 
 
 #endif
 #endif