This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug translator/11528] New: Pass string values by reference where possible
- From: "jistone at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sources dot redhat dot com
- Date: 22 Apr 2010 23:38:54 -0000
- Subject: [Bug translator/11528] New: Pass string values by reference where possible
- Reply-to: sourceware-bugzilla at sourceware dot org
For string variables that aren't modified after assignment, like most function
parameters, we could pass them as a "const char*" reference rather than a
char[MAXSTRINGLEN] copy. With script functions it's easy to tell if a parameter
is modified; for embedded-C functions we could perhaps have a new /* foo */
annotation.
Return values could get similar treatment -- __retvalue could be a char* which
is pointed to the desired destination. We just need to make sure that even with
an unused return value, we still give __retvalue somewhere to go.
--
Summary: Pass string values by reference where possible
Product: systemtap
Version: unspecified
Status: NEW
Severity: enhancement
Priority: P2
Component: translator
AssignedTo: systemtap at sources dot redhat dot com
ReportedBy: jistone at redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=11528
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.