winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
June 2011
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
809 discussions
Start a n
N
ew thread
Stefan Dösinger : wined3d: Use GL_ARB_draw_elements_base_vertex if available.
by Alexandre Julliard
14 Jun '11
14 Jun '11
Module: wine Branch: master Commit: dafd31861ae6e86745ee61de2674528845af983b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dafd31861ae6e86745ee61de2…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Sat Jun 11 16:18:45 2011 +0200 wined3d: Use GL_ARB_draw_elements_base_vertex if available. --- dlls/wined3d/device.c | 24 ++++++++++++++-------- dlls/wined3d/drawprim.c | 43 +++++++++++++++++++++++++++++---------- dlls/wined3d/state.c | 2 + dlls/wined3d/wined3d_private.h | 5 +++- 4 files changed, 53 insertions(+), 21 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 30d5b95..6a1e639 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -2391,10 +2391,6 @@ HRESULT CDECL wined3d_device_set_base_vertex_index(struct wined3d_device *device TRACE("Recording... not performing anything\n"); return WINED3D_OK; } - - /* The base vertex index affects the stream sources */ - device_invalidate_state(device, STATE_STREAMSRC); - return WINED3D_OK; } @@ -4092,7 +4088,7 @@ HRESULT CDECL wined3d_device_draw_primitive(struct wined3d_device *device, UINT if (device->stateBlock->state.load_base_vertex_index) { device->stateBlock->state.load_base_vertex_index = 0; - device_invalidate_state(device, STATE_STREAMSRC); + device_invalidate_state(device, STATE_BASEVERTEXINDEX); } /* Account for the loading offset due to index buffers. Instead of @@ -4106,6 +4102,7 @@ HRESULT CDECL wined3d_device_draw_indexed_primitive(struct wined3d_device *devic struct wined3d_buffer *index_buffer; UINT index_size = 2; GLuint vbo; + const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; TRACE("device %p, start_idx %u, index_count %u.\n", device, start_idx, index_count); @@ -4138,10 +4135,11 @@ HRESULT CDECL wined3d_device_draw_indexed_primitive(struct wined3d_device *devic else index_size = 4; - if (device->stateBlock->state.load_base_vertex_index != device->stateBlock->state.base_vertex_index) + if (!gl_info->supported[ARB_DRAW_ELEMENTS_BASE_VERTEX] && + device->stateBlock->state.load_base_vertex_index != device->stateBlock->state.base_vertex_index) { device->stateBlock->state.load_base_vertex_index = device->stateBlock->state.base_vertex_index; - device_invalidate_state(device, STATE_STREAMSRC); + device_invalidate_state(device, STATE_BASEVERTEXINDEX); } drawPrimitive(device, index_count, start_idx, index_size, @@ -4174,7 +4172,11 @@ HRESULT CDECL wined3d_device_draw_primitive_up(struct wined3d_device *device, UI stream->offset = 0; stream->stride = stream_stride; device->stateBlock->state.user_stream = TRUE; - device->stateBlock->state.load_base_vertex_index = 0; + if (device->stateBlock->state.load_base_vertex_index) + { + device->stateBlock->state.load_base_vertex_index = 0; + device_invalidate_state(device, STATE_BASEVERTEXINDEX); + } /* TODO: Only mark dirty if drawing from a different UP address */ device_invalidate_state(device, STATE_STREAMSRC); @@ -4224,7 +4226,11 @@ HRESULT CDECL wined3d_device_draw_indexed_primitive_up(struct wined3d_device *de /* Set to 0 as per msdn. Do it now due to the stream source loading during drawPrimitive */ device->stateBlock->state.base_vertex_index = 0; - device->stateBlock->state.load_base_vertex_index = 0; + if (device->stateBlock->state.load_base_vertex_index) + { + device->stateBlock->state.load_base_vertex_index = 0; + device_invalidate_state(device, STATE_BASEVERTEXINDEX); + } /* Mark the state dirty until we have nicer tracking of the stream source pointers */ device_invalidate_state(device, STATE_VDECL); device_invalidate_state(device, STATE_INDEXBUFFER); diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c index 45ee895..d5a656e 100644 --- a/dlls/wined3d/drawprim.c +++ b/dlls/wined3d/drawprim.c @@ -33,14 +33,24 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d_draw); #include <math.h> /* GL locking is done by the caller */ -static void drawStridedFast(GLenum primitive_type, UINT count, UINT idx_size, const void *idx_data, UINT start_idx) +static void drawStridedFast(const struct wined3d_gl_info *gl_info, GLenum primitive_type, UINT count, UINT idx_size, + const void *idx_data, UINT start_idx, INT base_vertex_index) { if (idx_size) { - glDrawElements(primitive_type, count, - idx_size == 2 ? GL_UNSIGNED_SHORT : GL_UNSIGNED_INT, - (const char *)idx_data + (idx_size * start_idx)); - checkGLcall("glDrawElements"); + GLenum idxtype = idx_size == 2 ? GL_UNSIGNED_SHORT : GL_UNSIGNED_INT; + if (gl_info->supported[ARB_DRAW_ELEMENTS_BASE_VERTEX]) + { + GL_EXTCALL(glDrawElementsBaseVertex(primitive_type, count, idxtype, + (const char *)idx_data + (idx_size * start_idx), base_vertex_index)); + checkGLcall("glDrawElementsBaseVertex"); + } + else + { + glDrawElements(primitive_type, count, + idxtype, (const char *)idx_data + (idx_size * start_idx)); + checkGLcall("glDrawElements"); + } } else { @@ -469,11 +479,12 @@ static void drawStridedSlowVs(const struct wined3d_gl_info *gl_info, const struc /* GL locking is done by the caller */ static void drawStridedInstanced(const struct wined3d_gl_info *gl_info, const struct wined3d_state *state, const struct wined3d_stream_info *si, UINT numberOfVertices, GLenum glPrimitiveType, - const void *idxData, UINT idxSize, UINT startIdx) + const void *idxData, UINT idxSize, UINT startIdx, UINT base_vertex_index) { UINT numInstances = 0, i; int numInstancedAttribs = 0, j; UINT instancedData[sizeof(si->elements) / sizeof(*si->elements) /* 16 */]; + GLenum idxtype = idxSize == 2 ? GL_UNSIGNED_SHORT : GL_UNSIGNED_INT; if (!idxSize) { @@ -530,9 +541,18 @@ static void drawStridedInstanced(const struct wined3d_gl_info *gl_info, const st send_attribute(gl_info, si->elements[instancedData[j]].format->id, instancedData[j], ptr); } - glDrawElements(glPrimitiveType, numberOfVertices, idxSize == 2 ? GL_UNSIGNED_SHORT : GL_UNSIGNED_INT, - (const char *)idxData+(idxSize * startIdx)); - checkGLcall("glDrawElements"); + if (gl_info->supported[ARB_DRAW_ELEMENTS_BASE_VERTEX]) + { + GL_EXTCALL(glDrawElementsBaseVertex(glPrimitiveType, numberOfVertices, idxtype, + (const char *)idxData+(idxSize * startIdx), base_vertex_index)); + checkGLcall("glDrawElementsBaseVertex"); + } + else + { + glDrawElements(glPrimitiveType, numberOfVertices, idxtype, + (const char *)idxData+(idxSize * startIdx)); + checkGLcall("glDrawElements"); + } } } @@ -646,6 +666,7 @@ void drawPrimitive(struct wined3d_device *device, UINT index_count, UINT StartId ENTER_GL(); { GLenum glPrimType = state->gl_primitive_type; + INT base_vertex_index = state->base_vertex_index; BOOL emulation = FALSE; const struct wined3d_stream_info *stream_info = &device->strided_streams; struct wined3d_stream_info stridedlcl; @@ -711,11 +732,11 @@ void drawPrimitive(struct wined3d_device *device, UINT index_count, UINT StartId { /* Instancing emulation with mixing immediate mode and arrays */ drawStridedInstanced(context->gl_info, state, stream_info, - index_count, glPrimType, idxData, idxSize, StartIdx); + index_count, glPrimType, idxData, idxSize, StartIdx, base_vertex_index); } else { - drawStridedFast(glPrimType, index_count, idxSize, idxData, StartIdx); + drawStridedFast(context->gl_info, glPrimType, index_count, idxSize, idxData, StartIdx, base_vertex_index); } } diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 6c6ae3a..632388c 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -5062,6 +5062,8 @@ const struct StateEntryTemplate misc_state_template[] = { { STATE_SAMPLER(17), /* Vertex sampler 1 */ { STATE_SAMPLER(17), sampler }, WINED3D_GL_EXT_NONE }, { STATE_SAMPLER(18), /* Vertex sampler 2 */ { STATE_SAMPLER(18), sampler }, WINED3D_GL_EXT_NONE }, { STATE_SAMPLER(19), /* Vertex sampler 3 */ { STATE_SAMPLER(19), sampler }, WINED3D_GL_EXT_NONE }, + { STATE_BASEVERTEXINDEX, { 0, NULL, }, ARB_DRAW_ELEMENTS_BASE_VERTEX }, + { STATE_BASEVERTEXINDEX, { STATE_STREAMSRC, NULL, }, WINED3D_GL_EXT_NONE }, {0 /* Terminate */, { 0, 0 }, WINED3D_GL_EXT_NONE }, }; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 44efb85..83fa40f 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -995,7 +995,10 @@ extern glMultiTexCoordFunc multi_texcoord_funcs[WINED3D_FFP_EMIT_COUNT] DECLSPEC #define STATE_POINTSPRITECOORDORIGIN (STATE_FRONTFACE + 1) #define STATE_IS_POINTSPRITECOORDORIGIN(a) ((a) == STATE_POINTSPRITECOORDORIGIN) -#define STATE_HIGHEST (STATE_POINTSPRITECOORDORIGIN) +#define STATE_BASEVERTEXINDEX (STATE_POINTSPRITECOORDORIGIN + 1) +#define STATE_IS_BASEVERTEXINDEX(a) ((a) == STATE_BASEVERTEXINDEX) + +#define STATE_HIGHEST (STATE_BASEVERTEXINDEX) enum fogsource { FOGSOURCE_FFP,
1
0
0
0
Stefan Dösinger : wined3d: Add GL_ARB_draw_elements_base_vertex.
by Alexandre Julliard
14 Jun '11
14 Jun '11
Module: wine Branch: master Commit: 7de2fa267048bdb25f5b36fca957030f65f556d3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7de2fa267048bdb25f5b36fca…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Sat Jun 11 15:39:30 2011 +0200 wined3d: Add GL_ARB_draw_elements_base_vertex. --- dlls/wined3d/directx.c | 1 + dlls/wined3d/wined3d_gl.h | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 0 deletions(-) diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 1dd2cba..34eea82 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -55,6 +55,7 @@ static const struct { {"GL_ARB_depth_clamp", ARB_DEPTH_CLAMP, 0 }, {"GL_ARB_depth_texture", ARB_DEPTH_TEXTURE, 0 }, {"GL_ARB_draw_buffers", ARB_DRAW_BUFFERS, 0 }, + {"GL_ARB_draw_elements_base_vertex", ARB_DRAW_ELEMENTS_BASE_VERTEX, 0 }, {"GL_ARB_fragment_program", ARB_FRAGMENT_PROGRAM, 0 }, {"GL_ARB_fragment_shader", ARB_FRAGMENT_SHADER, 0 }, {"GL_ARB_framebuffer_object", ARB_FRAMEBUFFER_OBJECT, 0 }, diff --git a/dlls/wined3d/wined3d_gl.h b/dlls/wined3d/wined3d_gl.h index be50b2f..85e5fea 100644 --- a/dlls/wined3d/wined3d_gl.h +++ b/dlls/wined3d/wined3d_gl.h @@ -1738,6 +1738,7 @@ typedef enum wined3d_gl_extension ARB_DEPTH_CLAMP, ARB_DEPTH_TEXTURE, ARB_DRAW_BUFFERS, + ARB_DRAW_ELEMENTS_BASE_VERTEX, ARB_FRAGMENT_PROGRAM, ARB_FRAGMENT_SHADER, ARB_FRAMEBUFFER_OBJECT, @@ -1965,6 +1966,19 @@ typedef void (WINE_GLAPI *PGLFNCLAMPCOLORARBPROC)(GLenum target, GLenum clamp); #endif typedef void (WINE_GLAPI *PGLFNDRAWBUFFERSARBPROC)(GLsizei n, const GLenum *bufs); +/* GL_ARB_draw_elements_base_vertex */ +#ifndef GL_ARB_draw_elements_base_vertex +#define GL_ARB_draw_elements_base_vertex 1 +typedef void (WINE_GLAPI *PGLFNDRAWELEMENTSBASEVERTEXPROC)(GLenum mode, GLsizei count, GLenum type, + const GLvoid *indices, GLint basevertex); +typedef void (WINE_GLAPI *PGLFNDRAWRANGEELEMENTSBASEVERTEXPROC)(GLenum mode, GLuint start, GLuint end, + GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex); +typedef void (WINE_GLAPI *PGLFNDRAWELEMENTSINSTANCEDBASEVERTEXPROC)(GLenum mode, GLsizei count, + GLenum type, const GLvoid *indices, GLsizei primcount, GLint basevertex); +typedef void (WINE_GLAPI *PGLFNMULTIDRAWELEMENTSBASEVERTEXPROC)(GLenum mode, GLsizei *count, GLenum type, + const GLvoid **indices, GLsizei primcount, GLint *basevertex); +#endif + /* GL_ARB_fragment_program */ #ifndef GL_ARB_fragment_program #define GL_ARB_fragment_program 1 @@ -3789,6 +3803,15 @@ typedef BOOL (WINAPI *WINED3D_PFNWGLSWAPINTERVALEXTPROC)(int interval); /* GL_ARB_draw_buffers */ \ USE_GL_FUNC(PGLFNDRAWBUFFERSARBPROC, \ glDrawBuffersARB, ARB_DRAW_BUFFERS, NULL) \ + /* GL_ARB_draw_elements_base_vertex */ \ + USE_GL_FUNC(PGLFNDRAWELEMENTSBASEVERTEXPROC, \ + glDrawElementsBaseVertex, ARB_DRAW_ELEMENTS_BASE_VERTEX, NULL) \ + USE_GL_FUNC(PGLFNDRAWRANGEELEMENTSBASEVERTEXPROC, \ + glDrawRangeElementsBaseVertex, ARB_DRAW_ELEMENTS_BASE_VERTEX, NULL) \ + USE_GL_FUNC(PGLFNDRAWELEMENTSINSTANCEDBASEVERTEXPROC, \ + glDrawElementsInstancedBaseVertex, ARB_DRAW_ELEMENTS_BASE_VERTEX, NULL) \ + USE_GL_FUNC(PGLFNMULTIDRAWELEMENTSBASEVERTEXPROC, \ + glMultiDrawElementsBaseVertex, ARB_DRAW_ELEMENTS_BASE_VERTEX, NULL) \ /* GL_ARB_framebuffer_object */ \ USE_GL_FUNC(PGLFNGLISRENDERBUFFERPROC, \ glIsRenderbuffer, ARB_FRAMEBUFFER_OBJECT, NULL) \
1
0
0
0
Hans Leidekker : msi: Pass the full custom action command to CreateProcess.
by Alexandre Julliard
14 Jun '11
14 Jun '11
Module: wine Branch: master Commit: 5ca2277cc5ee5722de1b62c051890c8db950bacf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5ca2277cc5ee5722de1b62c05…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Tue Jun 14 10:45:10 2011 +0200 msi: Pass the full custom action command to CreateProcess. --- dlls/msi/custom.c | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 53 insertions(+), 2 deletions(-) diff --git a/dlls/msi/custom.c b/dlls/msi/custom.c index 211bec0..8de6431 100644 --- a/dlls/msi/custom.c +++ b/dlls/msi/custom.c @@ -768,14 +768,65 @@ static UINT HANDLE_CustomType1(MSIPACKAGE *package, LPCWSTR source, return r; } -static HANDLE execute_command( const WCHAR *exe, WCHAR *arg, const WCHAR *dir ) +static HANDLE execute_command( const WCHAR *app, WCHAR *arg, const WCHAR *dir ) { + static const WCHAR dotexeW[] = {'.','e','x','e',0}; STARTUPINFOW si; PROCESS_INFORMATION info; + WCHAR *exe = NULL, *cmd = NULL, *p; BOOL ret; + if (app) + { + int len_arg = 0; + DWORD len_exe; + + if (!(exe = msi_alloc( MAX_PATH * sizeof(WCHAR) ))) return INVALID_HANDLE_VALUE; + len_exe = SearchPathW( NULL, app, dotexeW, MAX_PATH, exe, NULL ); + if (len_exe >= MAX_PATH) + { + msi_free( exe ); + if (!(exe = msi_alloc( len_exe * sizeof(WCHAR) ))) return INVALID_HANDLE_VALUE; + len_exe = SearchPathW( NULL, app, dotexeW, len_exe, exe, NULL ); + } + if (!len_exe) + { + WARN("can't find executable %u\n", GetLastError()); + msi_free( exe ); + return INVALID_HANDLE_VALUE; + } + + if (arg) len_arg = strlenW( arg ); + if (!(cmd = msi_alloc( (len_exe + len_arg + 4) * sizeof(WCHAR) ))) + { + msi_free( exe ); + return INVALID_HANDLE_VALUE; + } + p = cmd; + if (strchrW( exe, ' ' )) + { + *p++ = '\"'; + memcpy( p, exe, len_exe * sizeof(WCHAR) ); + p += len_exe; + *p++ = '\"'; + *p = 0; + } + else + { + strcpyW( p, exe ); + p += len_exe; + } + if (arg) + { + *p++ = ' '; + memcpy( p, arg, len_arg * sizeof(WCHAR) ); + p[len_arg] = 0; + } + } memset( &si, 0, sizeof(STARTUPINFOW) ); - ret = CreateProcessW( exe, arg, NULL, NULL, FALSE, 0, NULL, dir, &si, &info ); + ret = CreateProcessW( exe, exe ? cmd : arg, NULL, NULL, FALSE, 0, NULL, dir, &si, &info ); + msi_free( cmd ); + msi_free( exe ); if (!ret) { WARN("unable to execute command %u\n", GetLastError());
1
0
0
0
Hans Leidekker : ws2_32: Accept NULL lpNumberOfBytesSent for overlapped calls to WSASend/To.
by Alexandre Julliard
14 Jun '11
14 Jun '11
Module: wine Branch: master Commit: 3581d2c6d176fe922ee4c8b05768f18c59c93008 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3581d2c6d176fe922ee4c8b05…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Tue Jun 14 10:31:26 2011 +0200 ws2_32: Accept NULL lpNumberOfBytesSent for overlapped calls to WSASend/To. --- dlls/ws2_32/socket.c | 25 +++++++++++++------------ dlls/ws2_32/tests/sock.c | 24 +++++++++++++++++++++++- 2 files changed, 36 insertions(+), 13 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index e1a32fb..0c51985 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -3790,9 +3790,10 @@ static int WS2_sendto( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount, { unsigned int i, options; int n, fd, err; - struct ws2_async *wsa; + struct ws2_async *wsa = NULL; int totalLength = 0; ULONG_PTR cvalue = (lpOverlapped && ((ULONG_PTR)lpOverlapped->hEvent & 1) == 0) ? (ULONG_PTR)lpOverlapped : 0; + DWORD bytes_sent; TRACE("socket %04lx, wsabuf %p, nbufs %d, flags %d, to %p, tolen %d, ovl %p, func %p\n", s, lpBuffers, dwBufferCount, dwFlags, @@ -3803,6 +3804,11 @@ static int WS2_sendto( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount, if ( fd == -1 ) return SOCKET_ERROR; + if (!lpOverlapped && !lpNumberOfBytesSent) + { + err = WSAEFAULT; + goto error; + } if (!(wsa = HeapAlloc( GetProcessHeap(), 0, FIELD_OFFSET(struct ws2_async, iovec[dwBufferCount]) ))) { err = WSAEFAULT; @@ -3824,12 +3830,6 @@ static int WS2_sendto( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount, totalLength += lpBuffers[i].len; } - if (!lpNumberOfBytesSent) - { - err = WSAEFAULT; - goto error; - } - for (;;) { n = WS2_send( fd, wsa ); @@ -3881,7 +3881,7 @@ static int WS2_sendto( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount, iosb->u.Status = STATUS_SUCCESS; iosb->Information = n; - *lpNumberOfBytesSent = n; + if (lpNumberOfBytesSent) *lpNumberOfBytesSent = n; if (!wsa->completion_func) { if (cvalue) WS_AddCompletion( s, cvalue, STATUS_SUCCESS, n ); @@ -3900,7 +3900,7 @@ static int WS2_sendto( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount, * sending blocks until the entire buffer is sent. */ DWORD timeout_start = GetTickCount(); - *lpNumberOfBytesSent = n == -1 ? 0 : n; + bytes_sent = n == -1 ? 0 : n; while (wsa->first_iovec < wsa->n_iovecs) { @@ -3930,7 +3930,7 @@ static int WS2_sendto( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount, } if (n >= 0) - *lpNumberOfBytesSent += n; + bytes_sent += n; } } else /* non-blocking */ @@ -3942,11 +3942,12 @@ static int WS2_sendto( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount, err = WSAEWOULDBLOCK; goto error; } - *lpNumberOfBytesSent = n; + bytes_sent = n; } - TRACE(" -> %i bytes\n", *lpNumberOfBytesSent); + TRACE(" -> %i bytes\n", bytes_sent); + if (lpNumberOfBytesSent) *lpNumberOfBytesSent = bytes_sent; HeapFree( GetProcessHeap(), 0, wsa ); release_sock_fd( s, fd ); WSASetLastError(0); diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index ef01ed2..de9c400 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -3030,8 +3030,9 @@ static void test_send(void) goto end; bytes_sent = 0; + WSASetLastError(12345); ret = WSASend(dst, &buf, 1, &bytes_sent, 0, &ov, NULL); - ok((ret == SOCKET_ERROR && GetLastError() == ERROR_IO_PENDING) || broken(bytes_sent == buflen), + ok((ret == SOCKET_ERROR && WSAGetLastError() == ERROR_IO_PENDING) || broken(bytes_sent == buflen), "Failed to start overlapped send %d - %d - %d/%d\n", ret, WSAGetLastError(), bytes_sent, buflen); /* don't check for completion yet, we may need to drain the buffer while still sending */ @@ -3064,6 +3065,16 @@ static void test_send(void) "Got %d instead of %d (%d - %d)\n", bytes_sent, buflen, bret, GetLastError()); } + WSASetLastError(12345); + ret = WSASend(INVALID_SOCKET, &buf, 1, NULL, 0, &ov, NULL); + ok(ret == SOCKET_ERROR && WSAGetLastError() == WSAENOTSOCK, + "WSASend failed %d - %d\n", ret, WSAGetLastError()); + + WSASetLastError(12345); + ret = WSASend(dst, &buf, 1, NULL, 0, &ov, NULL); + ok(ret == SOCKET_ERROR && WSAGetLastError() == ERROR_IO_PENDING, + "Failed to start overlapped send %d - %d\n", ret, WSAGetLastError()); + end: if (src != INVALID_SOCKET) closesocket(src); @@ -3903,6 +3914,7 @@ static void test_WSASendTo(void) char buf[12] = "hello world"; WSABUF data_buf; DWORD bytesSent; + int ret; addr.sin_family = AF_INET; addr.sin_port = htons(139); @@ -3916,6 +3928,16 @@ static void test_WSASendTo(void) } WSASetLastError(12345); + ret = WSASendTo(INVALID_SOCKET, &data_buf, 1, NULL, 0, (struct sockaddr*)&addr, sizeof(addr), NULL, NULL); + ok(ret == SOCKET_ERROR && WSAGetLastError() == WSAENOTSOCK, + "WSASendTo() failed: %d/%d\n", ret, WSAGetLastError()); + + WSASetLastError(12345); + ret = WSASendTo(s, &data_buf, 1, NULL, 0, (struct sockaddr*)&addr, sizeof(addr), NULL, NULL); + ok(ret == SOCKET_ERROR && WSAGetLastError() == WSAEFAULT, + "WSASendTo() failed: %d/%d\n", ret, WSAGetLastError()); + + WSASetLastError(12345); if(WSASendTo(s, &data_buf, 1, &bytesSent, 0, (struct sockaddr*)&addr, sizeof(addr), NULL, NULL)) { ok(0, "WSASendTo() failed error: %d\n", WSAGetLastError()); return;
1
0
0
0
Andrew Eikum : winecoreaudio.drv: Initialize audio description flags.
by Alexandre Julliard
14 Jun '11
14 Jun '11
Module: wine Branch: master Commit: 4b62257b144e9c1f231a0d3853778cd8ec5e49f3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4b62257b144e9c1f231a0d385…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Mon Jun 13 15:23:14 2011 -0500 winecoreaudio.drv: Initialize audio description flags. --- dlls/winecoreaudio.drv/mmdevdrv.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/dlls/winecoreaudio.drv/mmdevdrv.c b/dlls/winecoreaudio.drv/mmdevdrv.c index d32e62a..26c9286 100644 --- a/dlls/winecoreaudio.drv/mmdevdrv.c +++ b/dlls/winecoreaudio.drv/mmdevdrv.c @@ -604,6 +604,8 @@ static HRESULT ca_get_audiodesc(AudioStreamBasicDescription *desc, { const WAVEFORMATEXTENSIBLE *fmtex = (const WAVEFORMATEXTENSIBLE *)fmt; + desc->mFormatFlags = 0; + if(fmt->wFormatTag == WAVE_FORMAT_PCM || (fmt->wFormatTag == WAVE_FORMAT_EXTENSIBLE && IsEqualGUID(&fmtex->SubFormat, &KSDATAFORMAT_SUBTYPE_PCM))){
1
0
0
0
Andrew Eikum : mmdevapi: Sessions should be unique per-device.
by Alexandre Julliard
14 Jun '11
14 Jun '11
Module: wine Branch: master Commit: bc10fd3ce68f3d51a4e5fbb6395758e9c957f5a5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bc10fd3ce68f3d51a4e5fbb63…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Mon Jun 13 15:23:09 2011 -0500 mmdevapi: Sessions should be unique per-device. --- dlls/mmdevapi/devenum.c | 2 +- dlls/mmdevapi/mmdevapi.h | 2 +- dlls/winealsa.drv/mmdevdrv.c | 61 +++++++++++++------------ dlls/winealsa.drv/winealsa.drv.spec | 2 +- dlls/winecoreaudio.drv/mmdevdrv.c | 61 +++++++++++++------------ dlls/winecoreaudio.drv/winecoreaudio.drv.spec | 2 +- dlls/wineoss.drv/mmdevdrv.c | 61 +++++++++++++------------ dlls/wineoss.drv/wineoss.drv.spec | 2 +- 8 files changed, 101 insertions(+), 92 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=bc10fd3ce68f3d51a4e5f…
1
0
0
0
Francois Gouget : comdlg32: Use macros for the resource IDs instead of numeric literals.
by Alexandre Julliard
14 Jun '11
14 Jun '11
Module: wine Branch: master Commit: aa005d7deecde1fa59d288304cc4b1325f582d15 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=aa005d7deecde1fa59d288304…
Author: Francois Gouget <fgouget(a)free.fr> Date: Mon Jun 13 16:11:55 2011 +0200 comdlg32: Use macros for the resource IDs instead of numeric literals. --- dlls/comdlg32/cdlg_Bg.rc | 62 ++++++++++++++-------------- dlls/comdlg32/cdlg_Ca.rc | 46 ++++++++++---------- dlls/comdlg32/cdlg_Cs.rc | 48 +++++++++++----------- dlls/comdlg32/cdlg_Da.rc | 48 +++++++++++----------- dlls/comdlg32/cdlg_De.rc | 46 ++++++++++---------- dlls/comdlg32/cdlg_El.rc | 62 ++++++++++++++-------------- dlls/comdlg32/cdlg_En.rc | 72 ++++++++++++++++---------------- dlls/comdlg32/cdlg_Eo.rc | 50 +++++++++++----------- dlls/comdlg32/cdlg_Es.rc | 62 ++++++++++++++-------------- dlls/comdlg32/cdlg_Fi.rc | 58 +++++++++++++------------- dlls/comdlg32/cdlg_Fr.rc | 72 ++++++++++++++++---------------- dlls/comdlg32/cdlg_He.rc | 62 ++++++++++++++-------------- dlls/comdlg32/cdlg_Hu.rc | 46 ++++++++++---------- dlls/comdlg32/cdlg_It.rc | 46 ++++++++++---------- dlls/comdlg32/cdlg_Ja.rc | 62 ++++++++++++++-------------- dlls/comdlg32/cdlg_Ko.rc | 62 ++++++++++++++-------------- dlls/comdlg32/cdlg_Lt.rc | 62 ++++++++++++++-------------- dlls/comdlg32/cdlg_Nl.rc | 46 ++++++++++---------- dlls/comdlg32/cdlg_No.rc | 62 ++++++++++++++-------------- dlls/comdlg32/cdlg_Pl.rc | 62 ++++++++++++++-------------- dlls/comdlg32/cdlg_Pt.rc | 92 ++++++++++++++++++++-------------------- dlls/comdlg32/cdlg_Ro.rc | 62 ++++++++++++++-------------- dlls/comdlg32/cdlg_Ru.rc | 46 ++++++++++---------- dlls/comdlg32/cdlg_Si.rc | 62 ++++++++++++++-------------- dlls/comdlg32/cdlg_Sk.rc | 56 ++++++++++++------------ dlls/comdlg32/cdlg_Sr.rc | 62 ++++++++++++++-------------- dlls/comdlg32/cdlg_Sv.rc | 46 ++++++++++---------- dlls/comdlg32/cdlg_Th.rc | 62 ++++++++++++++-------------- dlls/comdlg32/cdlg_Tr.rc | 62 ++++++++++++++-------------- dlls/comdlg32/cdlg_Uk.rc | 46 ++++++++++---------- dlls/comdlg32/cdlg_Wa.rc | 46 ++++++++++---------- dlls/comdlg32/cdlg_Zh.rc | 104 +++++++++++++++++++++++----------------------- 32 files changed, 941 insertions(+), 941 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=aa005d7deecde1fa59d28…
1
0
0
0
Alexandre Julliard : urlmon: Remove unneded stubs for IWindowForBindingUI.
by Alexandre Julliard
14 Jun '11
14 Jun '11
Module: wine Branch: master Commit: 75116153698817457ff9f7e41b7b3ff144617d67 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=75116153698817457ff9f7e41…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Jun 14 12:56:59 2011 +0200 urlmon: Remove unneded stubs for IWindowForBindingUI. --- dlls/urlmon/usrmarshal.c | 14 -------------- 1 files changed, 0 insertions(+), 14 deletions(-) diff --git a/dlls/urlmon/usrmarshal.c b/dlls/urlmon/usrmarshal.c index 6ff8f04..e6b468a 100644 --- a/dlls/urlmon/usrmarshal.c +++ b/dlls/urlmon/usrmarshal.c @@ -146,17 +146,3 @@ HRESULT __RPC_STUB IBinding_GetBindResult_Stub(IBinding* This, FIXME("stub\n"); return E_NOTIMPL; } - -HRESULT STDMETHODCALLTYPE IWindowForBindingUI_GetWindow_Proxy( - IWindowForBindingUI* This, REFGUID rguidReason, HWND *phwnd) -{ - FIXME("stub\n"); - return E_NOTIMPL; -} - -void __RPC_STUB IWindowForBindingUI_GetWindow_Stub(IRpcStubBuffer* This, - IRpcChannelBuffer* pRpcChannelBuffer, PRPC_MESSAGE pRpcMessage, - DWORD* pdwStubPhase) -{ - FIXME("stub\n"); -}
1
0
0
0
Alexandre Julliard : widl: Move the pointer check functionality to typegen. c.
by Alexandre Julliard
14 Jun '11
14 Jun '11
Module: wine Branch: master Commit: c173399d62e6a65872bee60bd4e3d95d0e06431e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c173399d62e6a65872bee60bd…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Jun 14 12:55:39 2011 +0200 widl: Move the pointer check functionality to typegen.c. --- tools/widl/client.c | 15 +-------------- tools/widl/proxy.c | 29 +---------------------------- tools/widl/typegen.c | 29 +++++++++++++++++++++++++++++ tools/widl/typegen.h | 1 + tools/widl/widltypes.h | 1 - 5 files changed, 32 insertions(+), 43 deletions(-) diff --git a/tools/widl/client.c b/tools/widl/client.c index 84f480b..be42b1b 100644 --- a/tools/widl/client.c +++ b/tools/widl/client.c @@ -50,19 +50,6 @@ static void print_client( const char *format, ... ) va_end(va); } - -static void check_pointers(const var_t *func) -{ - const var_t *var; - - if (!type_get_function_args(func->type)) - return; - - LIST_FOR_EACH_ENTRY( var, type_get_function_args(func->type), const var_t, entry ) - if (cant_be_null(var)) - print_client("if (!%s) RpcRaiseException(RPC_X_NULL_REF_POINTER);\n", var->name); -} - static void write_client_func_decl( const type_t *iface, const var_t *func ) { const char *callconv = get_attrp(func->type->attrs, ATTR_CALLCONV); @@ -173,7 +160,7 @@ static void write_function_stub( const type_t *iface, const var_t *func, write_full_pointer_init(client, indent, func, FALSE); /* check pointers */ - check_pointers(func); + write_pointer_checks( client, indent, func ); print_client("RpcTryFinally\n"); print_client("{\n"); diff --git a/tools/widl/proxy.c b/tools/widl/proxy.c index 2ff8ea1..8e2db07 100644 --- a/tools/widl/proxy.c +++ b/tools/widl/proxy.c @@ -120,23 +120,6 @@ static void clear_output_vars( const var_list_t *args ) } } -int cant_be_null(const var_t *v) -{ - switch (typegen_detect_type(v->type, v->attrs, TDT_IGNORE_STRINGS)) - { - case TGT_ARRAY: - if (!type_array_is_decl_as_ptr( v->type )) return 0; - /* fall through */ - case TGT_POINTER: - return (get_pointer_fc(v->type, v->attrs, TRUE) == RPC_FC_RP); - case TGT_CTXT_HANDLE_POINTER: - return TRUE; - default: - return 0; - } - -} - static int need_delegation(const type_t *iface) { const type_t *parent = type_iface_get_inherit( iface ); @@ -161,16 +144,6 @@ static int need_delegation_indirect(const type_t *iface) return get_delegation_indirect(iface, NULL); } -static void proxy_check_pointers( const var_list_t *args ) -{ - const var_t *arg; - - if (!args) return; - LIST_FOR_EACH_ENTRY( arg, args, const var_t, entry ) - if (cant_be_null(arg)) - print_proxy( "if (!%s) RpcRaiseException(RPC_X_NULL_REF_POINTER);\n", arg->name ); -} - static void free_variable( const var_t *arg, const char *local_var_prefix ) { unsigned int type_offset = arg->type->typestring_offset; @@ -303,7 +276,7 @@ static void gen_proxy(type_t *iface, const var_t *func, int idx, print_proxy( "{\n" ); indent++; print_proxy( "NdrProxyInitialize(This, &_RpcMessage, &__frame->_StubMsg, &Object_StubDesc, %d);\n", idx); - proxy_check_pointers( type_get_function_args(func->type) ); + write_pointer_checks( proxy, indent, func ); print_proxy( "RpcTryFinally\n" ); print_proxy( "{\n" ); diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c index 1a2329d..0096c32 100644 --- a/tools/widl/typegen.c +++ b/tools/widl/typegen.c @@ -373,6 +373,23 @@ enum typegen_type typegen_detect_type(const type_t *type, const attr_list_t *att return TGT_INVALID; } +static int cant_be_null(const var_t *v) +{ + switch (typegen_detect_type(v->type, v->attrs, TDT_IGNORE_STRINGS)) + { + case TGT_ARRAY: + if (!type_array_is_decl_as_ptr( v->type )) return 0; + /* fall through */ + case TGT_POINTER: + return (get_pointer_fc(v->type, v->attrs, TRUE) == RPC_FC_RP); + case TGT_CTXT_HANDLE_POINTER: + return TRUE; + default: + return 0; + } + +} + static int get_padding(const var_list_t *fields) { unsigned short offset = 0; @@ -4720,6 +4737,18 @@ void write_func_param_struct( FILE *file, const type_t *iface, const type_t *fun print_file( file, 0, "\n" ); } +void write_pointer_checks( FILE *file, int indent, const var_t *func ) +{ + const var_list_t *args = type_get_function_args( func->type ); + const var_t *var; + + if (!args) return; + + LIST_FOR_EACH_ENTRY( var, args, const var_t, entry ) + if (cant_be_null( var )) + print_file( file, indent, "if (!%s) RpcRaiseException(RPC_X_NULL_REF_POINTER);\n", var->name ); +} + int write_expr_eval_routines(FILE *file, const char *iface) { static const char *var_name = "pS"; diff --git a/tools/widl/typegen.h b/tools/widl/typegen.h index 3efd421..c98aff8 100644 --- a/tools/widl/typegen.h +++ b/tools/widl/typegen.h @@ -77,6 +77,7 @@ void assign_stub_out_args( FILE *file, int indent, const var_t *func, const char void declare_stub_args( FILE *file, int indent, const var_t *func ); void write_func_param_struct( FILE *file, const type_t *iface, const type_t *func, const char *var_decl, int add_retval ); +void write_pointer_checks( FILE *file, int indent, const var_t *func ); int write_expr_eval_routines(FILE *file, const char *iface); void write_expr_eval_routine_list(FILE *file, const char *iface); void write_user_quad_list(FILE *file); diff --git a/tools/widl/widltypes.h b/tools/widl/widltypes.h index 9e9bec6..64c94e5 100644 --- a/tools/widl/widltypes.h +++ b/tools/widl/widltypes.h @@ -544,7 +544,6 @@ void clear_all_offsets(void); int is_ptr(const type_t *t); int is_array(const type_t *t); -int cant_be_null(const var_t *v); #define tsENUM 1 #define tsSTRUCT 2
1
0
0
0
Alexandre Julliard : widl: Also check array pointers for null ref pointers.
by Alexandre Julliard
14 Jun '11
14 Jun '11
Module: wine Branch: master Commit: fa2b886d1d431f35c554d55f26e6f21653ffc5db URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fa2b886d1d431f35c554d55f2…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Jun 14 12:55:22 2011 +0200 widl: Also check array pointers for null ref pointers. --- tools/widl/client.c | 13 ++----------- tools/widl/proxy.c | 17 ++++------------- tools/widl/widltypes.h | 1 - 3 files changed, 6 insertions(+), 25 deletions(-) diff --git a/tools/widl/client.c b/tools/widl/client.c index 8e259b9..84f480b 100644 --- a/tools/widl/client.c +++ b/tools/widl/client.c @@ -59,17 +59,8 @@ static void check_pointers(const var_t *func) return; LIST_FOR_EACH_ENTRY( var, type_get_function_args(func->type), const var_t, entry ) - { - if (is_var_ptr(var) && cant_be_null(var)) - { - print_client("if (!%s)\n", var->name); - print_client("{\n"); - indent++; - print_client("RpcRaiseException(RPC_X_NULL_REF_POINTER);\n"); - indent--; - print_client("}\n\n"); - } - } + if (cant_be_null(var)) + print_client("if (!%s) RpcRaiseException(RPC_X_NULL_REF_POINTER);\n", var->name); } static void write_client_func_decl( const type_t *iface, const var_t *func ) diff --git a/tools/widl/proxy.c b/tools/widl/proxy.c index f4bd8d8..2ff8ea1 100644 --- a/tools/widl/proxy.c +++ b/tools/widl/proxy.c @@ -120,16 +120,13 @@ static void clear_output_vars( const var_list_t *args ) } } -int is_var_ptr(const var_t *v) -{ - return is_ptr(v->type); -} - int cant_be_null(const var_t *v) { switch (typegen_detect_type(v->type, v->attrs, TDT_IGNORE_STRINGS)) { case TGT_ARRAY: + if (!type_array_is_decl_as_ptr( v->type )) return 0; + /* fall through */ case TGT_POINTER: return (get_pointer_fc(v->type, v->attrs, TRUE) == RPC_FC_RP); case TGT_CTXT_HANDLE_POINTER: @@ -170,14 +167,8 @@ static void proxy_check_pointers( const var_list_t *args ) if (!args) return; LIST_FOR_EACH_ENTRY( arg, args, const var_t, entry ) - { - if (is_var_ptr(arg) && cant_be_null(arg)) { - print_proxy( "if(!%s)\n", arg->name ); - indent++; - print_proxy( "RpcRaiseException(RPC_X_NULL_REF_POINTER);\n"); - indent--; - } - } + if (cant_be_null(arg)) + print_proxy( "if (!%s) RpcRaiseException(RPC_X_NULL_REF_POINTER);\n", arg->name ); } static void free_variable( const var_t *arg, const char *local_var_prefix ) diff --git a/tools/widl/widltypes.h b/tools/widl/widltypes.h index ccb9d1a..9e9bec6 100644 --- a/tools/widl/widltypes.h +++ b/tools/widl/widltypes.h @@ -544,7 +544,6 @@ void clear_all_offsets(void); int is_ptr(const type_t *t); int is_array(const type_t *t); -int is_var_ptr(const var_t *v); int cant_be_null(const var_t *v); #define tsENUM 1
1
0
0
0
← Newer
1
...
44
45
46
47
48
49
50
...
81
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
Results per page:
10
25
50
100
200