[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [48731] branches/soc-2011-tomato: svn merge ^/trunk/blender -r48691:48729

Campbell Barton ideasman42 at gmail.com
Sun Jul 8 17:55:59 CEST 2012


Revision: 48731
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48731
Author:   campbellbarton
Date:     2012-07-08 15:55:58 +0000 (Sun, 08 Jul 2012)
Log Message:
-----------
svn merge ^/trunk/blender -r48691:48729

Revision Links:
--------------
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48691

Modified Paths:
--------------
    branches/soc-2011-tomato/doc/python_api/rst/bge.types.rst
    branches/soc-2011-tomato/intern/ghost/intern/GHOST_WindowX11.cpp
    branches/soc-2011-tomato/intern/guardedalloc/MEM_guardedalloc.h
    branches/soc-2011-tomato/intern/guardedalloc/intern/mallocn.c
    branches/soc-2011-tomato/release/scripts/modules/bl_i18n_utils/bl_process_msg.py
    branches/soc-2011-tomato/release/scripts/modules/bl_i18n_utils/settings.py
    branches/soc-2011-tomato/release/scripts/modules/bl_i18n_utils/update_po.py
    branches/soc-2011-tomato/release/scripts/modules/bl_i18n_utils/update_pot.py
    branches/soc-2011-tomato/release/scripts/modules/bl_i18n_utils/utils.py
    branches/soc-2011-tomato/release/scripts/startup/bl_operators/wm.py
    branches/soc-2011-tomato/source/blender/avi/intern/avi.c
    branches/soc-2011-tomato/source/blender/blenkernel/BKE_idprop.h
    branches/soc-2011-tomato/source/blender/blenkernel/BKE_lamp.h
    branches/soc-2011-tomato/source/blender/blenkernel/BKE_library.h
    branches/soc-2011-tomato/source/blender/blenkernel/intern/CCGSubSurf.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/DerivedMesh.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/action.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/anim.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/anim_sys.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/armature.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/blender.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/bmfont.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/booleanops_mesh.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/brush.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/bvhutils.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/cloth.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/collision.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/constraint.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/customdata.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/depsgraph.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/displist.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/dynamicpaint.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/effect.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/fcurve.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/fmodifier.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/font.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/idprop.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/image.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/implicit.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/ipo.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/lamp.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/library.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/material.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/nla.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/object.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/packedFile.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/particle.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/property.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/scene.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/seqeffects.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/sequencer.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/shrinkwrap.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/smoke.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/softbody.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/texture.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/tracking.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/writeffmpeg.c
    branches/soc-2011-tomato/source/blender/blenlib/BLI_string.h
    branches/soc-2011-tomato/source/blender/blenlib/intern/BLI_ghash.c
    branches/soc-2011-tomato/source/blender/blenlib/intern/BLI_kdopbvh.c
    branches/soc-2011-tomato/source/blender/blenlib/intern/DLRB_tree.c
    branches/soc-2011-tomato/source/blender/blenlib/intern/fileops.c
    branches/soc-2011-tomato/source/blender/blenlib/intern/freetypefont.c
    branches/soc-2011-tomato/source/blender/blenlib/intern/math_geom.c
    branches/soc-2011-tomato/source/blender/blenlib/intern/math_matrix.c
    branches/soc-2011-tomato/source/blender/blenlib/intern/math_rotation.c
    branches/soc-2011-tomato/source/blender/blenlib/intern/noise.c
    branches/soc-2011-tomato/source/blender/blenlib/intern/string.c
    branches/soc-2011-tomato/source/blender/blenlib/intern/voxel.c
    branches/soc-2011-tomato/source/blender/blenlib/intern/winstuff.c
    branches/soc-2011-tomato/source/blender/bmesh/intern/bmesh_opdefines.c
    branches/soc-2011-tomato/source/blender/bmesh/operators/bmo_hull.c
    branches/soc-2011-tomato/source/blender/compositor/operations/COM_BokehBlurOperation.cpp
    branches/soc-2011-tomato/source/blender/compositor/operations/COM_DilateErodeOperation.cpp
    branches/soc-2011-tomato/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp
    branches/soc-2011-tomato/source/blender/editors/animation/anim_channels_defines.c
    branches/soc-2011-tomato/source/blender/editors/animation/anim_channels_edit.c
    branches/soc-2011-tomato/source/blender/editors/animation/anim_draw.c
    branches/soc-2011-tomato/source/blender/editors/animation/anim_filter.c
    branches/soc-2011-tomato/source/blender/editors/animation/anim_ipo_utils.c
    branches/soc-2011-tomato/source/blender/editors/animation/fmodifier_ui.c
    branches/soc-2011-tomato/source/blender/editors/animation/keyframes_draw.c
    branches/soc-2011-tomato/source/blender/editors/animation/keyframing.c
    branches/soc-2011-tomato/source/blender/editors/animation/keyingsets.c
    branches/soc-2011-tomato/source/blender/editors/armature/armature_ops.c
    branches/soc-2011-tomato/source/blender/editors/armature/editarmature.c
    branches/soc-2011-tomato/source/blender/editors/armature/poseSlide.c
    branches/soc-2011-tomato/source/blender/editors/armature/poseUtils.c
    branches/soc-2011-tomato/source/blender/editors/armature/poselib.c
    branches/soc-2011-tomato/source/blender/editors/armature/poseobject.c
    branches/soc-2011-tomato/source/blender/editors/armature/reeb.c
    branches/soc-2011-tomato/source/blender/editors/curve/editfont.c
    branches/soc-2011-tomato/source/blender/editors/gpencil/drawgpencil.c
    branches/soc-2011-tomato/source/blender/editors/gpencil/gpencil_edit.c
    branches/soc-2011-tomato/source/blender/editors/gpencil/gpencil_paint.c
    branches/soc-2011-tomato/source/blender/editors/interface/interface.c
    branches/soc-2011-tomato/source/blender/editors/interface/interface_anim.c
    branches/soc-2011-tomato/source/blender/editors/interface/interface_draw.c
    branches/soc-2011-tomato/source/blender/editors/interface/interface_handlers.c
    branches/soc-2011-tomato/source/blender/editors/interface/interface_regions.c
    branches/soc-2011-tomato/source/blender/editors/interface/interface_style.c
    branches/soc-2011-tomato/source/blender/editors/interface/interface_templates.c
    branches/soc-2011-tomato/source/blender/editors/interface/interface_widgets.c
    branches/soc-2011-tomato/source/blender/editors/interface/resources.c
    branches/soc-2011-tomato/source/blender/editors/interface/view2d.c
    branches/soc-2011-tomato/source/blender/editors/interface/view2d_ops.c
    branches/soc-2011-tomato/source/blender/editors/io/io_collada.c
    branches/soc-2011-tomato/source/blender/editors/io/io_ops.c
    branches/soc-2011-tomato/source/blender/editors/mask/mask_editaction.c
    branches/soc-2011-tomato/source/blender/editors/mesh/editface.c
    branches/soc-2011-tomato/source/blender/editors/mesh/editmesh_bvh.c
    branches/soc-2011-tomato/source/blender/editors/mesh/editmesh_knife.c
    branches/soc-2011-tomato/source/blender/editors/mesh/editmesh_select.c
    branches/soc-2011-tomato/source/blender/editors/mesh/editmesh_tools.c
    branches/soc-2011-tomato/source/blender/editors/mesh/meshtools.c
    branches/soc-2011-tomato/source/blender/editors/object/object_add.c
    branches/soc-2011-tomato/source/blender/editors/object/object_constraint.c
    branches/soc-2011-tomato/source/blender/editors/object/object_edit.c
    branches/soc-2011-tomato/source/blender/editors/object/object_hook.c
    branches/soc-2011-tomato/source/blender/editors/object/object_modifier.c
    branches/soc-2011-tomato/source/blender/editors/object/object_transform.c
    branches/soc-2011-tomato/source/blender/editors/object/object_vgroup.c
    branches/soc-2011-tomato/source/blender/editors/physics/physics_fluid.c
    branches/soc-2011-tomato/source/blender/editors/render/render_opengl.c
    branches/soc-2011-tomato/source/blender/editors/screen/area.c
    branches/soc-2011-tomato/source/blender/editors/sculpt_paint/paint_cursor.c
    branches/soc-2011-tomato/source/blender/editors/sculpt_paint/paint_image.c
    branches/soc-2011-tomato/source/blender/editors/space_action/action_edit.c
    branches/soc-2011-tomato/source/blender/editors/space_buttons/buttons_header.c
    branches/soc-2011-tomato/source/blender/editors/space_file/filelist.c
    branches/soc-2011-tomato/source/blender/editors/space_file/filesel.c
    branches/soc-2011-tomato/source/blender/editors/space_file/fsmenu.c
    branches/soc-2011-tomato/source/blender/editors/space_graph/graph_edit.c
    branches/soc-2011-tomato/source/blender/editors/space_graph/graph_select.c
    branches/soc-2011-tomato/source/blender/editors/space_image/image_buttons.c
    branches/soc-2011-tomato/source/blender/editors/space_image/image_ops.c
    branches/soc-2011-tomato/source/blender/editors/space_nla/nla_channels.c
    branches/soc-2011-tomato/source/blender/editors/space_view3d/drawanimviz.c
    branches/soc-2011-tomato/source/blender/editors/space_view3d/drawobject.c
    branches/soc-2011-tomato/source/blender/editors/space_view3d/view3d_draw.c
    branches/soc-2011-tomato/source/blender/editors/transform/transform.c
    branches/soc-2011-tomato/source/blender/editors/transform/transform_conversions.c
    branches/soc-2011-tomato/source/blender/editors/uvedit/uvedit_smart_stitch.c
    branches/soc-2011-tomato/source/blender/gpu/intern/gpu_material.c
    branches/soc-2011-tomato/source/blender/ikplugin/intern/iksolver_plugin.c
    branches/soc-2011-tomato/source/blender/imbuf/intern/IMB_anim.h
    branches/soc-2011-tomato/source/blender/imbuf/intern/allocimbuf.c
    branches/soc-2011-tomato/source/blender/imbuf/intern/anim_movie.c
    branches/soc-2011-tomato/source/blender/imbuf/intern/imageprocess.c
    branches/soc-2011-tomato/source/blender/imbuf/intern/indexer.c
    branches/soc-2011-tomato/source/blender/imbuf/intern/indexer_dv.c
    branches/soc-2011-tomato/source/blender/imbuf/intern/jp2.c
    branches/soc-2011-tomato/source/blender/imbuf/intern/jpeg.c
    branches/soc-2011-tomato/source/blender/imbuf/intern/openexr/openexr_api.cpp
    branches/soc-2011-tomato/source/blender/imbuf/intern/openexr/openexr_multi.h
    branches/soc-2011-tomato/source/blender/imbuf/intern/openexr/openexr_stub.cpp
    branches/soc-2011-tomato/source/blender/imbuf/intern/png.c
    branches/soc-2011-tomato/source/blender/imbuf/intern/radiance_hdr.c
    branches/soc-2011-tomato/source/blender/imbuf/intern/tiff.c
    branches/soc-2011-tomato/source/blender/makesdna/DNA_ID.h
    branches/soc-2011-tomato/source/blender/makesdna/DNA_space_types.h
    branches/soc-2011-tomato/source/blender/makesdna/intern/makesdna.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_mesh_api.c
    branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_boolean_util.c
    branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_collision.c
    branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_fluidsim_util.c
    branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_multires.c
    branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_smoke.c
    branches/soc-2011-tomato/source/blender/python/intern/bpy_interface.c
    branches/soc-2011-tomato/source/blender/python/intern/bpy_library.c
    branches/soc-2011-tomato/source/blender/python/intern/bpy_rna.c
    branches/soc-2011-tomato/source/blender/python/intern/gpu.c
    branches/soc-2011-tomato/source/blender/python/mathutils/mathutils_Matrix.c
    branches/soc-2011-tomato/source/blender/quicktime/apple/quicktime_export.c
    branches/soc-2011-tomato/source/blender/render/extern/include/RE_pipeline.h
    branches/soc-2011-tomato/source/blender/render/intern/raytrace/rayobject_qbvh.cpp
    branches/soc-2011-tomato/source/blender/render/intern/raytrace/rayobject_svbvh.cpp
    branches/soc-2011-tomato/source/blender/render/intern/source/convertblender.c
    branches/soc-2011-tomato/source/blender/render/intern/source/envmap.c
    branches/soc-2011-tomato/source/blender/render/intern/source/external_engine.c
    branches/soc-2011-tomato/source/blender/render/intern/source/imagetexture.c
    branches/soc-2011-tomato/source/blender/render/intern/source/occlusion.c
    branches/soc-2011-tomato/source/blender/render/intern/source/pipeline.c
    branches/soc-2011-tomato/source/blender/render/intern/source/rayshade.c
    branches/soc-2011-tomato/source/blender/render/intern/source/render_result.c
    branches/soc-2011-tomato/source/blender/render/intern/source/render_texture.c
    branches/soc-2011-tomato/source/blender/render/intern/source/rendercore.c
    branches/soc-2011-tomato/source/blender/render/intern/source/shadbuf.c
    branches/soc-2011-tomato/source/blender/render/intern/source/shadeinput.c
    branches/soc-2011-tomato/source/blender/render/intern/source/shadeoutput.c
    branches/soc-2011-tomato/source/blender/render/intern/source/sunsky.c
    branches/soc-2011-tomato/source/blender/render/intern/source/texture_ocean.c
    branches/soc-2011-tomato/source/blender/render/intern/source/volume_precache.c
    branches/soc-2011-tomato/source/blender/render/intern/source/volumetric.c
    branches/soc-2011-tomato/source/blender/render/intern/source/voxeldata.c
    branches/soc-2011-tomato/source/blender/render/intern/source/zbuf.c
    branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_cursors.c
    branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_files.c
    branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_init_exit.c
    branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_keymap.c
    branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_subwindow.c
    branches/soc-2011-tomato/source/creator/creator.c
    branches/soc-2011-tomato/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp
    branches/soc-2011-tomato/source/gameengine/GamePlayer/xembed/UnixShell.c
    branches/soc-2011-tomato/source/gameengine/GamePlayer/xembed/blenderplayer-wrapper.c
    branches/soc-2011-tomato/source/gameengine/Ketsji/KX_ObstacleSimulation.cpp
    branches/soc-2011-tomato/source/gameengine/Physics/Bullet/CcdPhysicsController.h

Property Changed:
----------------
    branches/soc-2011-tomato/
    branches/soc-2011-tomato/source/blender/editors/interface/interface.c
    branches/soc-2011-tomato/source/blender/editors/space_outliner/


Property changes on: branches/soc-2011-tomato
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-48691
   + /branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-48729

Modified: branches/soc-2011-tomato/doc/python_api/rst/bge.types.rst
===================================================================
--- branches/soc-2011-tomato/doc/python_api/rst/bge.types.rst	2012-07-08 15:48:47 UTC (rev 48730)
+++ branches/soc-2011-tomato/doc/python_api/rst/bge.types.rst	2012-07-08 15:55:58 UTC (rev 48731)
@@ -4222,6 +4222,10 @@
    .. attribute:: projection_matrix
 
       This camera's 4x4 projection matrix.
+	  
+      .. note::
+      
+         This is the identity matrix prior to rendering the first frame (any Python done on frame 1). 
 
       :type: 4x4 Matrix [[float]]
 
@@ -4233,7 +4237,7 @@
 
       .. note::
       
-         This matrix is regenerated every frame from the camera's position and orientation. 
+         This matrix is regenerated every frame from the camera's position and orientation. Also, this is the identity matrix prior to rendering the first frame (any Python done on frame 1).
 
    .. attribute:: camera_to_world
 

Modified: branches/soc-2011-tomato/intern/ghost/intern/GHOST_WindowX11.cpp
===================================================================
--- branches/soc-2011-tomato/intern/ghost/intern/GHOST_WindowX11.cpp	2012-07-08 15:48:47 UTC (rev 48730)
+++ branches/soc-2011-tomato/intern/ghost/intern/GHOST_WindowX11.cpp	2012-07-08 15:55:58 UTC (rev 48731)
@@ -419,8 +419,8 @@
 	x_image = XCreateImage(display, m_visual->visual, 24, ZPixmap, 0, NULL, BLENDER_ICON_WIDTH, BLENDER_ICON_HEIGHT, 32, 0);
 	mask_image = XCreateImage(display, m_visual->visual, 1, ZPixmap, 0, NULL,  BLENDER_ICON_WIDTH, BLENDER_ICON_HEIGHT, 8, 0);
 	
-	x_image->data = (char *)malloc(x_image->bytes_per_line * BLENDER_ICON_HEIGHT);
-	mask_image->data = (char *)malloc(mask_image->bytes_per_line * BLENDER_ICON_HEIGHT);
+	x_image->data = (char *)calloc(x_image->bytes_per_line * BLENDER_ICON_HEIGHT, 1);
+	mask_image->data = (char *)calloc(mask_image->bytes_per_line * BLENDER_ICON_HEIGHT, 1);
 	
 	/* copy the BLENDER_ICON_48x48x24 into the XImage */
 	unsigned char *col = BLENDER_ICON_48x48x24;
@@ -429,7 +429,11 @@
 		for (py = 0; py < BLENDER_ICON_HEIGHT; py++, col += 3) {
 			/* mask out pink */
 			if (col[0] == 255 && col[1] == 0 && col[2] == 255) {
+#if 0
+				/* instead, use calloc above */
+				XPutPixel(x_image, px, py, 0); /* avoid uninitialized memory, otherwise not needed */
 				XPutPixel(mask_image, px, py, 0);
+#endif
 			}
 			else {
 				XPutPixel(x_image, px, py, (col[0] << 16) + (col[1] << 8) + col[2]);
@@ -1143,7 +1147,6 @@
 }
 
 #include <iostream>
-using namespace std;
 
 GHOST_TSuccess
 GHOST_WindowX11::

Modified: branches/soc-2011-tomato/intern/guardedalloc/MEM_guardedalloc.h
===================================================================
--- branches/soc-2011-tomato/intern/guardedalloc/MEM_guardedalloc.h	2012-07-08 15:48:47 UTC (rev 48730)
+++ branches/soc-2011-tomato/intern/guardedalloc/MEM_guardedalloc.h	2012-07-08 15:55:58 UTC (rev 48731)
@@ -63,14 +63,6 @@
 #include <stdio.h> /* needed for FILE* */
 #include "MEM_sys_types.h" /* needed for uintptr_t */
 
-#ifndef WARN_UNUSED
-#  ifdef __GNUC__
-#    define WARN_UNUSED  __attribute__((warn_unused_result))
-#  else
-#    define WARN_UNUSED
-#  endif
-#endif
-
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -78,14 +70,17 @@
 	/** Returns the length of the allocated memory segment pointed at
 	 * by vmemh. If the pointer was not previously allocated by this
 	 * module, the result is undefined.*/
-	size_t MEM_allocN_len(void *vmemh) WARN_UNUSED;
+	size_t MEM_allocN_len(void *vmemh)
+#ifdef __GNUC__
+	__attribute__((warn_unused_result))
+#endif
+	;
 
 	/**
 	 * Release memory previously allocatred by this module. 
 	 */
 	short MEM_freeN(void *vmemh);
 
-
 	/**
 	 * Return zero if memory is not in allocated list
 	 */
@@ -94,30 +89,57 @@
 	/**
 	 * Duplicates a block of memory, and returns a pointer to the
 	 * newly allocated block.  */
-	void *MEM_dupallocN(void *vmemh) WARN_UNUSED;
+	void *MEM_dupallocN(void *vmemh)
+#ifdef __GNUC__
+	__attribute__((warn_unused_result))
+#endif
+	;
 
 	/**
 	 * Reallocates a block of memory, and returns pointer to the newly
 	 * allocated block, the old one is freed. this is not as optimized
 	 * as a system realloc but just makes a new allocation and copies
 	 * over from existing memory. */
-	void *MEM_reallocN(void *vmemh, size_t len) WARN_UNUSED;
+	void *MEM_reallocN(void *vmemh, size_t len)
+#ifdef __GNUC__
+	__attribute__((warn_unused_result))
+	__attribute__((alloc_size(2)))
+#endif
+	;
 
 	/**
 	 * Allocate a block of memory of size len, with tag name str. The
 	 * memory is cleared. The name must be static, because only a
 	 * pointer to it is stored ! */
-	void *MEM_callocN(size_t len, const char * str) WARN_UNUSED;
+	void *MEM_callocN(size_t len, const char * str)
+#ifdef __GNUC__
+	__attribute__((warn_unused_result))
+	__attribute__((nonnull))
+	__attribute__((alloc_size(1)))
+#endif
+	;
 	
 	/** Allocate a block of memory of size len, with tag name str. The
 	 * name must be a static, because only a pointer to it is stored !
 	 * */
-	void *MEM_mallocN(size_t len, const char * str) WARN_UNUSED;
+	void *MEM_mallocN(size_t len, const char * str)
+#ifdef __GNUC__
+	__attribute__((warn_unused_result))
+	__attribute__((nonnull))
+	__attribute__((alloc_size(1)))
+#endif
+	;
 	
 	/** Same as callocN, clears memory and uses mmap (disk cached) if supported.
 	 * Can be free'd with MEM_freeN as usual.
 	 * */
-	void *MEM_mapallocN(size_t len, const char * str) WARN_UNUSED;
+	void *MEM_mapallocN(size_t len, const char * str)
+#ifdef __GNUC__
+	__attribute__((warn_unused_result))
+	__attribute__((nonnull))
+	__attribute__((alloc_size(1)))
+#endif
+	;
 
 	/** Print a list of the names and sizes of all allocated memory
 	 * blocks. as a python dict for easy investigation */ 
@@ -162,7 +184,11 @@
 	void MEM_reset_peak_memory(void);
 
 	/** Get the peak memory usage in bytes, including mmap allocations. */
-	uintptr_t MEM_get_peak_memory(void) WARN_UNUSED;
+	uintptr_t MEM_get_peak_memory(void)
+#ifdef __GNUC__
+	__attribute__((warn_unused_result))
+#endif
+	;
 
 #ifndef NDEBUG
 const char *MEM_name_ptr(void *vmemh);

Modified: branches/soc-2011-tomato/intern/guardedalloc/intern/mallocn.c
===================================================================
--- branches/soc-2011-tomato/intern/guardedalloc/intern/mallocn.c	2012-07-08 15:48:47 UTC (rev 48730)
+++ branches/soc-2011-tomato/intern/guardedalloc/intern/mallocn.c	2012-07-08 15:55:58 UTC (rev 48731)
@@ -163,6 +163,9 @@
 /* implementation                                                        */
 /* --------------------------------------------------------------------- */
 
+#ifdef __GNUC__
+__attribute__ ((format(printf, 1, 2)))
+#endif
 static void print_error(const char *str, ...)
 {
 	char buf[512];

Modified: branches/soc-2011-tomato/release/scripts/modules/bl_i18n_utils/bl_process_msg.py
===================================================================
--- branches/soc-2011-tomato/release/scripts/modules/bl_i18n_utils/bl_process_msg.py	2012-07-08 15:48:47 UTC (rev 48730)
+++ branches/soc-2011-tomato/release/scripts/modules/bl_i18n_utils/bl_process_msg.py	2012-07-08 15:55:58 UTC (rev 48731)
@@ -25,8 +25,7 @@
 import os
 
 # XXX Relative import does not work here when used from Blender...
-#from . import settings
-import bl_i18n_utils.settings as settings
+from bl_i18n_utils import settings
 
 
 #classes = set()

Modified: branches/soc-2011-tomato/release/scripts/modules/bl_i18n_utils/settings.py
===================================================================
--- branches/soc-2011-tomato/release/scripts/modules/bl_i18n_utils/settings.py	2012-07-08 15:48:47 UTC (rev 48730)
+++ branches/soc-2011-tomato/release/scripts/modules/bl_i18n_utils/settings.py	2012-07-08 15:55:58 UTC (rev 48731)
@@ -100,9 +100,12 @@
     tuple((r"{}\(\s*" + _ctxt_re + r"\s*,\s*"+ _msg_re + r"\s*\)").format(it)
           for it in ("CTX_IFACE_", "CTX_TIP_", "CTX_N_"))
 )
-#GETTEXT_KEYWORDS = ("IFACE_", "CTX_IFACE_:1c,2", "TIP_", "CTX_TIP_:1c,2",
-#                    "N_", "CTX_N_:1c,2")
 
+ESCAPE_RE = (
+    ('((?<!\\\\)"|(?<!\\\\)\\\\(?!\\\\|"))', r"\\\1"),
+    ('\t', r"\\t"),
+)
+
 # Should po parser warn when finding a first letter not capitalized?
 WARN_MSGID_NOT_CAPITALIZED = True
 

Modified: branches/soc-2011-tomato/release/scripts/modules/bl_i18n_utils/update_po.py
===================================================================
--- branches/soc-2011-tomato/release/scripts/modules/bl_i18n_utils/update_po.py	2012-07-08 15:48:47 UTC (rev 48730)
+++ branches/soc-2011-tomato/release/scripts/modules/bl_i18n_utils/update_po.py	2012-07-08 15:55:58 UTC (rev 48731)
@@ -71,6 +71,8 @@
     # update po file
     cmd = (GETTEXT_MSGMERGE_EXECUTABLE,
            "--update",
+           "-w", "1",  # XXX Ugly hack to prevent msgmerge merging
+                       #     short source comments together!
            "--no-wrap",
            "--backup=none",
            "--lang={}".format(lang),

Modified: branches/soc-2011-tomato/release/scripts/modules/bl_i18n_utils/update_pot.py
===================================================================
--- branches/soc-2011-tomato/release/scripts/modules/bl_i18n_utils/update_pot.py	2012-07-08 15:48:47 UTC (rev 48730)
+++ branches/soc-2011-tomato/release/scripts/modules/bl_i18n_utils/update_pot.py	2012-07-08 15:55:58 UTC (rev 48731)
@@ -26,7 +26,6 @@
 import os
 import sys
 import re
-#from codecs import open
 import tempfile
 import argparse
 import time
@@ -40,14 +39,11 @@
 COMMENT_PREFIX_SOURCE = settings.COMMENT_PREFIX_SOURCE

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list