aboutsummaryrefslogtreecommitdiff
path: root/type.c
diff options
context:
space:
mode:
authorPetr Machata <pmachata@redhat.com>2012-01-07 01:04:40 +0100
committerPetr Machata <pmachata@redhat.com>2012-08-29 19:02:07 +0200
commit4767187d0d7924bfe5028fe3e29e3b018bc9c99b (patch)
treef4aad6f467d1979528a5070181358b60bb480c4f /type.c
parent940ec0650bfe0f1deda96d3561be3d0006df92fc (diff)
downloadltrace-4767187d0d7924bfe5028fe3e29e3b018bc9c99b.tar.gz
Add value_string_to_charp
- I consider this a temporary solution before ARGTYPE_STRING is removed. Since we need to handle strings as array(char, zero)*, it's necessary to do this conversion by hand every once in a while. This code implements such transformation.
Diffstat (limited to 'type.c')
-rw-r--r--type.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/type.c b/type.c
index cd621d3..1054659 100644
--- a/type.c
+++ b/type.c
@@ -397,6 +397,8 @@ type_sizeof(struct Process *proc, struct arg_type_info *type)
return (size_t)-1;
return size;
+ case ARGTYPE_STRING_N:
+ /* String is a char* in disguise. */
case ARGTYPE_POINTER:
return sizeof(void *);
@@ -430,9 +432,6 @@ type_sizeof(struct Process *proc, struct arg_type_info *type)
case ARGTYPE_OCTAL:
case ARGTYPE_UNKNOWN:
return sizeof(long);
-
- case ARGTYPE_STRING_N:
- return -1;
}
abort();