vala r1671 - in trunk: . gobject
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r1671 - in trunk: . gobject
- Date: Wed, 2 Jul 2008 14:27:46 +0000 (UTC)
Author: juergbi
Date: Wed Jul 2 14:27:46 2008
New Revision: 1671
URL: http://svn.gnome.org/viewvc/vala?rev=1671&view=rev
Log:
2008-07-02 JÃrg Billeter <j bitron ch>
* gobject/valaccodegeneratorsourcefile.vala:
Don't perform pointer arithmetic on void pointers,
patch by Tai Chi Minh Ralph Eastwood
Modified:
trunk/ChangeLog
trunk/THANKS
trunk/gobject/valaccodegeneratorsourcefile.vala
Modified: trunk/THANKS
==============================================================================
--- trunk/THANKS (original)
+++ trunk/THANKS Wed Jul 2 14:27:46 2008
@@ -46,6 +46,7 @@
Ross Burton
Samuel Cormier-Iijima
StÃphan Kochen
+Tai Chi Minh Ralph Eastwood
Thijs Vermeir
Travis Watkins
Vlad Grecescu
Modified: trunk/gobject/valaccodegeneratorsourcefile.vala
==============================================================================
--- trunk/gobject/valaccodegeneratorsourcefile.vala (original)
+++ trunk/gobject/valaccodegeneratorsourcefile.vala Wed Jul 2 14:27:46 2008
@@ -100,7 +100,7 @@
fun.add_parameter (new CCodeFormalParameter ("length", "gint"));
source_type_member_declaration.append (fun.copy ());
- var array = new CCodeIdentifier ("array");
+ var array = new CCodeCastExpression (new CCodeIdentifier ("array"), "char*");
var element_size = new CCodeIdentifier ("element_size");
var length = new CCodeIdentifier ("length");
var src = new CCodeIdentifier ("src");
@@ -118,14 +118,14 @@
fun.block.add_statement (new CCodeExpressionStatement (ccall));
var czero1 = new CCodeFunctionCall (new CCodeIdentifier ("memset"));
- czero1.add_argument (new CCodeCastExpression (src_address, "char *"));
+ czero1.add_argument (src_address);
czero1.add_argument (new CCodeConstant ("0"));
czero1.add_argument (new CCodeBinaryExpression (CCodeBinaryOperator.MUL, new CCodeParenthesizedExpression (new CCodeBinaryExpression (CCodeBinaryOperator.MINUS, dest, src)), element_size));
var czeroblock1 = new CCodeBlock ();
czeroblock1.add_statement (new CCodeExpressionStatement (czero1));
var czero2 = new CCodeFunctionCall (new CCodeIdentifier ("memset"));
- czero2.add_argument (new CCodeCastExpression (dest_end_address, "char *"));
+ czero2.add_argument (dest_end_address);
czero2.add_argument (new CCodeConstant ("0"));
czero2.add_argument (new CCodeBinaryExpression (CCodeBinaryOperator.MUL, new CCodeParenthesizedExpression (new CCodeBinaryExpression (CCodeBinaryOperator.MINUS, src, dest)), element_size));
var czeroblock2 = new CCodeBlock ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]