Changeset 78116 in vbox for trunk/src/VBox/GuestHost/OpenGL/glapi_parser
- Timestamp:
- Apr 12, 2019 10:03:24 AM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 129998
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/OpenGL/glapi_parser/apiutil.py
r69392 r78116 558 558 #====================================================================== 559 559 560 def _needPointerOrigin(name, type): 561 return type == 'const GLvoid *' and (name == 'pointer' or name == 'NULL'); 562 560 563 def MakeCallString(params): 561 564 """Given a list of (name, type, vectorSize) parameters, make a C-style … … 575 578 #enddef 576 579 580 def MakeCallStringForDispatcher(params): 581 """Same as MakeCallString, but with 'pointer' origin hack for bugref:9407.""" 582 strResult = '' 583 fFirst = True; 584 for (name, type, vecSize) in params: 585 if not fFirst: strResult += ', '; 586 else: fFirst = False; 587 strResult += name; 588 if _needPointerOrigin(name, type): 589 if name != 'NULL': strResult += ', fRealPtr'; 590 else: strResult += ', 0 /*fRealPtr*/'; 591 return strResult; 592 577 593 578 594 def MakeDeclarationString(params): … … 596 612 #endif 597 613 #enddef 614 615 def MakeDeclarationStringForDispatcher(params): 616 """Same as MakeDeclarationString, but with 'pointer' origin hack for bugref:9407.""" 617 if len(params) == 0: 618 return 'void'; 619 strResult = ''; 620 fFirst = True; 621 for (name, type, vecSize) in params: 622 if not fFirst: strResult += ', '; 623 else: fFirst = False; 624 strResult = strResult + type + ' ' + name; 625 if _needPointerOrigin(name, type): 626 strResult = strResult + ' CRVBOX_HOST_ONLY_PARAM(int fRealPtr)'; 627 return strResult; 598 628 599 629 def MakeDeclarationStringWithContext(ctx_macro_prefix, params): … … 632 662 #endif 633 663 #enddef 664 665 def MakePrototypeStringForDispatcher(params): 666 """Same as MakePrototypeString, but with 'pointer' origin hack for bugref:9407.""" 667 if len(params) == 0: 668 return 'void' 669 strResult = '' 670 fFirst = True; 671 for (name, type, vecSize) in params: 672 if not fFirst: strResult += ', '; 673 else: fFirst = False; 674 strResult = strResult + type 675 if _needPointerOrigin(name, type): 676 strResult += ' CRVBOX_HOST_ONLY_PARAM(int)'; 677 return strResult; 634 678 635 679
Note:
See TracChangeset
for help on using the changeset viewer.