summaryrefslogtreecommitdiffstats
path: root/tapset/builtin_string.stp
diff options
context:
space:
mode:
authorfche <fche>2005-08-03 16:54:12 +0000
committerfche <fche>2005-08-03 16:54:12 +0000
commit27cffb521607b81eec660ab9f5b8b607d014c692 (patch)
tree152a7b326e849ee89ab6f1b81ad5d098b0620df3 /tapset/builtin_string.stp
parentd8aeeb5dff71172116b09141e0443cdf023d51de (diff)
downloadsystemtap-steved-27cffb521607b81eec660ab9f5b8b607d014c692.tar.gz
systemtap-steved-27cffb521607b81eec660ab9f5b8b607d014c692.tar.xz
systemtap-steved-27cffb521607b81eec660ab9f5b8b607d014c692.zip
2005-08-03 Frank Ch. Eigler <fche@elastic.org>
* README: Be more specific about prerequisites. * tapset/builtin_string.stp: New builtin. * testsuite/buildok/seven.stp, semko/eighteen.stp: New tests.
Diffstat (limited to 'tapset/builtin_string.stp')
-rw-r--r--tapset/builtin_string.stp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tapset/builtin_string.stp b/tapset/builtin_string.stp
new file mode 100644
index 00000000..d068febb
--- /dev/null
+++ b/tapset/builtin_string.stp
@@ -0,0 +1,7 @@
+function _string (num) %{
+ sprintf (THIS->__retvalue, "%lld", (long long) THIS->num);
+%}
+
+function string (num) {
+ return "" . _string (num + 0)
+}