You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mt...@apache.org on 2009/12/11 17:23:35 UTC

svn commit: r889685 - in /commons/sandbox/runtime/trunk/src/main/native: include/acr_ini.h shared/ini.c

Author: mturk
Date: Fri Dec 11 16:23:35 2009
New Revision: 889685

URL: http://svn.apache.org/viewvc?rev=889685&view=rev
Log:
Return the full attribute

Modified:
    commons/sandbox/runtime/trunk/src/main/native/include/acr_ini.h
    commons/sandbox/runtime/trunk/src/main/native/shared/ini.c

Modified: commons/sandbox/runtime/trunk/src/main/native/include/acr_ini.h
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/include/acr_ini.h?rev=889685&r1=889684&r2=889685&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/include/acr_ini.h (original)
+++ commons/sandbox/runtime/trunk/src/main/native/include/acr_ini.h Fri Dec 11 16:23:35 2009
@@ -172,14 +172,14 @@
                                                  const char *val);
 
 /**
- * Get the value attribute associated with key.
+ * Get the attribute associated with key.
  * @param node Node for which to get attribute.
  * @param key Attribute key.
- * @return Attribute value or NULL if key was not found.
+ * @return Attribute for the given key or NULL if not found.
  */
-ACR_DECLARE(const char *) ACR_IniNodeAttrGet(JNIEnv *env,
-                                             acr_ini_node_t *node,
-                                             const char *key);
+ACR_DECLARE(acr_ini_attr_t *) ACR_IniNodeAttrGet(JNIEnv *env,
+                                                 acr_ini_node_t *node,
+                                                 const char *key);
 
 /**
  * Add value to the existing attribute value.

Modified: commons/sandbox/runtime/trunk/src/main/native/shared/ini.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/shared/ini.c?rev=889685&r1=889684&r2=889685&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/shared/ini.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/shared/ini.c Fri Dec 11 16:23:35 2009
@@ -189,7 +189,7 @@
     return ap;
 }
 
-ACR_DECLARE(const char *) ACR_IniNodeAttrGet(JNIEnv *_E, acr_ini_node_t *node,
+ACR_DECLARE(acr_ini_attr_t *) ACR_IniNodeAttrGet(JNIEnv *_E, acr_ini_node_t *node,
                                              const char *key)
 {
     acr_ini_attr_t *ap;
@@ -201,7 +201,7 @@
          ap != ACR_RING_SENTINEL(&(node->attr_ring), acr_ini_attr_t, link);
          ap = ACR_RING_NEXT(ap, link)) {
         if (!strcasecmp(key, ap->key)) {
-            return ap->val;
+            return ap;
         }
     }
     return NULL;