Check-in Number:
|
2151 | |
Date: |
2002-May-23 11:13:20 (local)
2002-May-23 09:13:20 (UTC) |
User: | thl |
Branch: | |
Comment: |
lib_var experts, please review |
Tickets: |
|
Inspections: |
|
Files: |
|
ossp-pkg/lmtp2nntp/lmtp2nntp_msg.c 1.11 -> 1.12
--- lmtp2nntp_msg.c 2002/05/23 08:35:12 1.11
+++ lmtp2nntp_msg.c 2002/05/23 09:13:20 1.12
@@ -661,12 +661,6 @@
*pnOut = strlen(*cppOut);
}
else {
- /*FIXME interesting lib_var behaviour:
- *cppOut = NULL; returning NULL with size/out=0 means not expandable and keeps the current value
- *cppOut = (char *)mallocex(0); returning any freeable pointer with size/out=0 means empty value
- *pnOutsize = 0;
- *pnOut = 0;
- */
*cppOut = (char *)mallocex(0); //FIXME is this portable?
*pnOutsize = 0;
*pnOut = 0;
|
|
ossp-pkg/var/var.pod 1.32 -> 1.33
--- var.pod 2002/03/08 12:55:52 1.32
+++ var.pod 2002/05/23 09:13:20 1.33
@@ -382,6 +382,7 @@
This is a pointer to the location where the callback function should
store the pointer to the resolved value of the variable.
+Returning an empty value requires this pointer to be non-NULL otherwise it is interpreted as not expandable.
=item size_t *I<val_len>
@@ -407,6 +408,11 @@
=back
+*cppOut = NULL; returning NULL with size/out=0 means not expandable and keeps the current value
+*cppOut = (char *)mallocex(0); returning any freeable pointer with size/out=0 means empty value
+*pnOutsize = 0;
+*pnOut = 0;
+
The return code of the lookup function B<cb> is interpreted by
B<var_expand> according to the following convention: C<VAR_OK> means
success, that is, the contents of the variable has been resolved
|
|