Skip to content

Instantly share code, notes, and snippets.

@erik
Created July 4, 2011 20:19
Show Gist options
  • Save erik/1063874 to your computer and use it in GitHub Desktop.
Save erik/1063874 to your computer and use it in GitHub Desktop.
public static void main() {
int a = 5;
string s = @"a = $a";
stdout.printf(s);
}
/* file.c generated by valac 0.12.0, the Vala compiler
* generated from file.vala, do not modify */
#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#define _g_free0(var) (var = (g_free (var), NULL))
void _vala_main (void);
void _vala_main (void) {
gint a;
gchar* _tmp0_ = NULL;
gchar* _tmp1_;
gchar* _tmp2_ = NULL;
gchar* _tmp3_;
gchar* s;
a = 5;
_tmp0_ = g_strdup_printf ("%i", a);
_tmp1_ = _tmp0_;
_tmp2_ = g_strconcat ("a = ", _tmp1_, NULL);
_tmp3_ = _tmp2_;
_g_free0 (_tmp1_);
s = _tmp3_;
fprintf (stdout, "%s", s);
_g_free0 (s);
}
int main (int argc, char ** argv) {
g_type_init ();
_vala_main ();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment