소스 검색

Merge branch 'release/1.10.x'

rdb 5 년 전
부모
커밋
d01c53c2d8

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 432 - 353
dtool/src/cppparser/cppBison.cxx.prebuilt


+ 6 - 2
dtool/src/cppparser/cppBison.h.prebuilt

@@ -1,8 +1,9 @@
-/* A Bison parser, made by GNU Bison 3.0.5.  */
+/* A Bison parser, made by GNU Bison 3.5.3.  */
 
 
 /* Bison interface for Yacc-like parsers in C
 /* Bison interface for Yacc-like parsers in C
 
 
-   Copyright (C) 1984, 1989-1990, 2000-2015, 2018 Free Software Foundation, Inc.
+   Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation,
+   Inc.
 
 
    This program is free software: you can redistribute it and/or modify
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    it under the terms of the GNU General Public License as published by
@@ -30,6 +31,9 @@
    This special exception was added by the Free Software Foundation in
    This special exception was added by the Free Software Foundation in
    version 2.2 of Bison.  */
    version 2.2 of Bison.  */
 
 
+/* Undocumented macros, especially those whose name start with YY_,
+   are private implementation details.  Do not rely on them.  */
+
 #ifndef YY_CPPYY_BUILT_TMP_CPPBISON_YXX_H_INCLUDED
 #ifndef YY_CPPYY_BUILT_TMP_CPPBISON_YXX_H_INCLUDED
 # define YY_CPPYY_BUILT_TMP_CPPBISON_YXX_H_INCLUDED
 # define YY_CPPYY_BUILT_TMP_CPPBISON_YXX_H_INCLUDED
 /* Debug traces.  */
 /* Debug traces.  */

+ 13 - 37
dtool/src/cppparser/cppBison.yxx

@@ -1891,7 +1891,7 @@ instance_identifier_and_maybe_trailing_return_type:
   }
   }
   $$ = $1;
   $$ = $1;
 }
 }
-        | instance_identifier ':' INTEGER
+        | instance_identifier ':' const_expr
 {
 {
   // Bitfield definition.
   // Bitfield definition.
   $1->_bit_width = $3;
   $1->_bit_width = $3;
@@ -3278,17 +3278,9 @@ no_angle_bracket_const_expr:
 {
 {
   $$ = new CPPExpression(CPPExpression::sizeof_func($3));
   $$ = new CPPExpression(CPPExpression::sizeof_func($3));
 }
 }
-        | KW_SIZEOF '(' IDENTIFIER ')' %prec UNARY
+        | KW_SIZEOF no_angle_bracket_const_expr %prec UNARY
 {
 {
-  CPPDeclaration *arg = $3->find_symbol(current_scope, global_scope, current_lexer);
-  if (arg == nullptr) {
-    yyerror("undefined sizeof argument: " + $3->get_fully_scoped_name(), @3);
-  } else if (arg->get_subtype() == CPPDeclaration::ST_instance) {
-    CPPInstance *inst = arg->as_instance();
-    $$ = new CPPExpression(CPPExpression::sizeof_func(inst->_type));
-  } else {
-    $$ = new CPPExpression(CPPExpression::sizeof_func(arg->as_type()));
-  }
+  $$ = new CPPExpression(CPPExpression::sizeof_func($2));
 }
 }
         | KW_SIZEOF ELLIPSIS '(' name ')' %prec UNARY
         | KW_SIZEOF ELLIPSIS '(' name ')' %prec UNARY
 {
 {
@@ -3402,9 +3394,9 @@ no_angle_bracket_const_expr:
 {
 {
   $$ = new CPPExpression('f', $1);
   $$ = new CPPExpression('f', $1);
 }
 }
-        | no_angle_bracket_const_expr '.' no_angle_bracket_const_expr
+        | no_angle_bracket_const_expr '.' name
 {
 {
-  $$ = new CPPExpression('.', $1, $3);
+  $$ = new CPPExpression('.', $1, new CPPExpression($3, current_scope, global_scope, current_lexer));
 }
 }
         | no_angle_bracket_const_expr POINTSAT no_angle_bracket_const_expr
         | no_angle_bracket_const_expr POINTSAT no_angle_bracket_const_expr
 {
 {
@@ -3542,17 +3534,9 @@ const_expr:
 {
 {
   $$ = new CPPExpression(CPPExpression::sizeof_func($3));
   $$ = new CPPExpression(CPPExpression::sizeof_func($3));
 }
 }
-        | KW_SIZEOF '(' IDENTIFIER ')' %prec UNARY
+        | KW_SIZEOF const_expr %prec UNARY
 {
 {
-  CPPDeclaration *arg = $3->find_symbol(current_scope, global_scope, current_lexer);
-  if (arg == nullptr) {
-    yyerror("undefined sizeof argument: " + $3->get_fully_scoped_name(), @3);
-  } else if (arg->get_subtype() == CPPDeclaration::ST_instance) {
-    CPPInstance *inst = arg->as_instance();
-    $$ = new CPPExpression(CPPExpression::sizeof_func(inst->_type));
-  } else {
-    $$ = new CPPExpression(CPPExpression::sizeof_func(arg->as_type()));
-  }
+  $$ = new CPPExpression(CPPExpression::sizeof_func($2));
 }
 }
         | KW_SIZEOF ELLIPSIS '(' name ')' %prec UNARY
         | KW_SIZEOF ELLIPSIS '(' name ')' %prec UNARY
 {
 {
@@ -3704,9 +3688,9 @@ const_expr:
 {
 {
   $$ = new CPPExpression('f', $1);
   $$ = new CPPExpression('f', $1);
 }
 }
-        | const_expr '.' const_expr
+        | const_expr '.' name
 {
 {
-  $$ = new CPPExpression('.', $1, $3);
+  $$ = new CPPExpression('.', $1, new CPPExpression($3, current_scope, global_scope, current_lexer));
 }
 }
         | const_expr POINTSAT const_expr
         | const_expr POINTSAT const_expr
 {
 {
@@ -3886,17 +3870,9 @@ formal_const_expr:
 {
 {
   $$ = new CPPExpression(CPPExpression::sizeof_func($3));
   $$ = new CPPExpression(CPPExpression::sizeof_func($3));
 }
 }
-        | KW_SIZEOF '(' IDENTIFIER ')' %prec UNARY
+        | KW_SIZEOF formal_const_expr %prec UNARY
 {
 {
-  CPPDeclaration *arg = $3->find_symbol(current_scope, global_scope, current_lexer);
-  if (arg == nullptr) {
-    yyerror("undefined sizeof argument: " + $3->get_fully_scoped_name(), @3);
-  } else if (arg->get_subtype() == CPPDeclaration::ST_instance) {
-    CPPInstance *inst = arg->as_instance();
-    $$ = new CPPExpression(CPPExpression::sizeof_func(inst->_type));
-  } else {
-    $$ = new CPPExpression(CPPExpression::sizeof_func(arg->as_type()));
-  }
+  $$ = new CPPExpression(CPPExpression::sizeof_func($2));
 }
 }
         | KW_SIZEOF ELLIPSIS '(' name ')' %prec UNARY
         | KW_SIZEOF ELLIPSIS '(' name ')' %prec UNARY
 {
 {
@@ -4044,9 +4020,9 @@ formal_const_expr:
 {
 {
   $$ = new CPPExpression('f', $1);
   $$ = new CPPExpression('f', $1);
 }
 }
-        | formal_const_expr '.' const_expr
+        | formal_const_expr '.' name
 {
 {
-  $$ = new CPPExpression('.', $1, $3);
+  $$ = new CPPExpression('.', $1, new CPPExpression($3, current_scope, global_scope, current_lexer));
 }
 }
         | formal_const_expr POINTSAT const_expr
         | formal_const_expr POINTSAT const_expr
 {
 {

+ 47 - 9
dtool/src/cppparser/cppExpression.cxx

@@ -429,12 +429,24 @@ type_trait(int trait, CPPType *type, CPPType *arg) {
 CPPExpression CPPExpression::
 CPPExpression CPPExpression::
 sizeof_func(CPPType *type) {
 sizeof_func(CPPType *type) {
   CPPExpression expr(0);
   CPPExpression expr(0);
-  expr._type = T_sizeof;
+  expr._type = T_sizeof_type;
   expr._u._typecast._to = type;
   expr._u._typecast._to = type;
   expr._u._typecast._op1 = nullptr;
   expr._u._typecast._op1 = nullptr;
   return expr;
   return expr;
 }
 }
 
 
+/**
+ *
+ */
+CPPExpression CPPExpression::
+sizeof_func(CPPExpression *op1) {
+  CPPExpression expr(0);
+  expr._type = T_sizeof_expr;
+  expr._u._typecast._to = nullptr;
+  expr._u._typecast._op1 = op1;
+  return expr;
+}
+
 /**
 /**
  *
  *
  */
  */
@@ -629,7 +641,8 @@ evaluate() const {
   case T_empty_aggregate_init:
   case T_empty_aggregate_init:
   case T_new:
   case T_new:
   case T_default_new:
   case T_default_new:
-  case T_sizeof:
+  case T_sizeof_type:
+  case T_sizeof_expr:
   case T_sizeof_ellipsis:
   case T_sizeof_ellipsis:
     return Result();
     return Result();
 
 
@@ -1058,7 +1071,8 @@ determine_type() const {
   case T_default_new:
   case T_default_new:
     return CPPType::new_type(new CPPPointerType(_u._typecast._to));
     return CPPType::new_type(new CPPPointerType(_u._typecast._to));
 
 
-  case T_sizeof:
+  case T_sizeof_type:
+  case T_sizeof_expr:
   case T_sizeof_ellipsis:
   case T_sizeof_ellipsis:
   case T_alignof:
   case T_alignof:
     // Note: this should actually be size_t, but that is defined as a typedef
     // Note: this should actually be size_t, but that is defined as a typedef
@@ -1334,10 +1348,13 @@ is_fully_specified() const {
   case T_default_construct:
   case T_default_construct:
   case T_empty_aggregate_init:
   case T_empty_aggregate_init:
   case T_default_new:
   case T_default_new:
-  case T_sizeof:
+  case T_sizeof_type:
   case T_alignof:
   case T_alignof:
     return _u._typecast._to->is_fully_specified();
     return _u._typecast._to->is_fully_specified();
 
 
+  case T_sizeof_expr:
+    return _u._typecast._op1->is_fully_specified();
+
   case T_sizeof_ellipsis:
   case T_sizeof_ellipsis:
     return _u._ident->is_fully_specified();
     return _u._ident->is_fully_specified();
 
 
@@ -1469,7 +1486,7 @@ substitute_decl(CPPDeclaration::SubstDecl &subst,
   case T_default_construct:
   case T_default_construct:
   case T_empty_aggregate_init:
   case T_empty_aggregate_init:
   case T_default_new:
   case T_default_new:
-  case T_sizeof:
+  case T_sizeof_type:
   case T_alignof:
   case T_alignof:
     rep->_u._typecast._to =
     rep->_u._typecast._to =
       _u._typecast._to->substitute_decl(subst, current_scope, global_scope)
       _u._typecast._to->substitute_decl(subst, current_scope, global_scope)
@@ -1477,6 +1494,13 @@ substitute_decl(CPPDeclaration::SubstDecl &subst,
     any_changed = any_changed || (rep->_u._typecast._to != _u._typecast._to);
     any_changed = any_changed || (rep->_u._typecast._to != _u._typecast._to);
     break;
     break;
 
 
+  case T_sizeof_expr:
+    rep->_u._typecast._op1 =
+      _u._typecast._op1->substitute_decl(subst, current_scope, global_scope)
+      ->as_expression();
+    any_changed = any_changed || (rep->_u._typecast._op1 != _u._typecast._op1);
+    break;
+
   case T_trinary_operation:
   case T_trinary_operation:
     rep->_u._op._op3 =
     rep->_u._op._op3 =
       _u._op._op3->substitute_decl(subst, current_scope, global_scope)
       _u._op._op3->substitute_decl(subst, current_scope, global_scope)
@@ -1567,10 +1591,13 @@ is_tbd() const {
   case T_new:
   case T_new:
   case T_default_construct:
   case T_default_construct:
   case T_default_new:
   case T_default_new:
-  case T_sizeof:
+  case T_sizeof_type:
   case T_alignof:
   case T_alignof:
     return _u._typecast._to->is_tbd();
     return _u._typecast._to->is_tbd();
 
 
+  case T_sizeof_expr:
+    return _u._typecast._op1->is_tbd();
+
   case T_trinary_operation:
   case T_trinary_operation:
     if (_u._op._op3->is_tbd()) {
     if (_u._op._op3->is_tbd()) {
       return true;
       return true;
@@ -1807,12 +1834,17 @@ output(std::ostream &out, int indent_level, CPPScope *scope, bool) const {
     out << "())";
     out << "())";
     break;
     break;
 
 
-  case T_sizeof:
+  case T_sizeof_type:
     out << "sizeof(";
     out << "sizeof(";
     _u._typecast._to->output(out, indent_level, scope, false);
     _u._typecast._to->output(out, indent_level, scope, false);
     out << ")";
     out << ")";
     break;
     break;
 
 
+  case T_sizeof_expr:
+    out << "sizeof ";
+    _u._typecast._op1->output(out, indent_level, scope, false);
+    break;
+
   case T_sizeof_ellipsis:
   case T_sizeof_ellipsis:
     out << "sizeof...(";
     out << "sizeof...(";
     _u._ident->output(out, scope);
     _u._ident->output(out, scope);
@@ -2222,10 +2254,13 @@ is_equal(const CPPDeclaration *other) const {
   case T_default_construct:
   case T_default_construct:
   case T_empty_aggregate_init:
   case T_empty_aggregate_init:
   case T_default_new:
   case T_default_new:
-  case T_sizeof:
+  case T_sizeof_type:
   case T_alignof:
   case T_alignof:
     return _u._typecast._to == ot->_u._typecast._to;
     return _u._typecast._to == ot->_u._typecast._to;
 
 
+  case T_sizeof_expr:
+    return _u._typecast._op1 == ot->_u._typecast._op1;
+
   case T_unary_operation:
   case T_unary_operation:
     return *_u._op._op1 == *ot->_u._op._op1;
     return *_u._op._op1 == *ot->_u._op._op1;
 
 
@@ -2324,10 +2359,13 @@ is_less(const CPPDeclaration *other) const {
   case T_default_construct:
   case T_default_construct:
   case T_empty_aggregate_init:
   case T_empty_aggregate_init:
   case T_default_new:
   case T_default_new:
-  case T_sizeof:
+  case T_sizeof_type:
   case T_alignof:
   case T_alignof:
     return _u._typecast._to < ot->_u._typecast._to;
     return _u._typecast._to < ot->_u._typecast._to;
 
 
+  case T_sizeof_expr:
+    return _u._typecast._op1 < ot->_u._typecast._op1;
+
   case T_trinary_operation:
   case T_trinary_operation:
     if (*_u._op._op3 != *ot->_u._op._op3) {
     if (*_u._op._op3 != *ot->_u._op._op3) {
       return *_u._op._op3 < *ot->_u._op._op3;
       return *_u._op._op3 < *ot->_u._op._op3;

+ 3 - 1
dtool/src/cppparser/cppExpression.h

@@ -52,7 +52,8 @@ public:
     T_empty_aggregate_init,
     T_empty_aggregate_init,
     T_new,
     T_new,
     T_default_new,
     T_default_new,
-    T_sizeof,
+    T_sizeof_type,
+    T_sizeof_expr,
     T_sizeof_ellipsis,
     T_sizeof_ellipsis,
     T_alignof,
     T_alignof,
     T_unary_operation,
     T_unary_operation,
@@ -89,6 +90,7 @@ public:
   static CPPExpression typeid_op(CPPExpression *op1, CPPType *std_type_info);
   static CPPExpression typeid_op(CPPExpression *op1, CPPType *std_type_info);
   static CPPExpression type_trait(int trait, CPPType *type, CPPType *arg = nullptr);
   static CPPExpression type_trait(int trait, CPPType *type, CPPType *arg = nullptr);
   static CPPExpression sizeof_func(CPPType *type);
   static CPPExpression sizeof_func(CPPType *type);
+  static CPPExpression sizeof_func(CPPExpression *op1);
   static CPPExpression sizeof_ellipsis_func(CPPIdentifier *ident);
   static CPPExpression sizeof_ellipsis_func(CPPIdentifier *ident);
   static CPPExpression alignof_func(CPPType *type);
   static CPPExpression alignof_func(CPPType *type);
   static CPPExpression lambda(CPPClosureType *type);
   static CPPExpression lambda(CPPClosureType *type);

+ 11 - 1
dtool/src/cppparser/cppInstance.cxx

@@ -74,7 +74,17 @@ CPPInstance(CPPType *type, CPPInstanceIdentifier *ii, int storage_class,
   ii->_ident = nullptr;
   ii->_ident = nullptr;
   _storage_class = storage_class;
   _storage_class = storage_class;
   _initializer = nullptr;
   _initializer = nullptr;
-  _bit_width = ii->_bit_width;
+
+  if (ii->_bit_width != nullptr) {
+    CPPExpression::Result result = ii->_bit_width->evaluate();
+    if (result._type != CPPExpression::RT_error) {
+      _bit_width = ii->_bit_width->evaluate().as_integer();
+    } else {
+      _bit_width = -1;
+    }
+  } else {
+    _bit_width = -1;
+  }
 
 
   CPPParameterList *params = ii->get_initializer();
   CPPParameterList *params = ii->get_initializer();
   if (params != nullptr) {
   if (params != nullptr) {

+ 1 - 1
dtool/src/cppparser/cppInstanceIdentifier.cxx

@@ -82,7 +82,7 @@ initializer_type(CPPParameterList *params) {
 CPPInstanceIdentifier::
 CPPInstanceIdentifier::
 CPPInstanceIdentifier(CPPIdentifier *ident) :
 CPPInstanceIdentifier(CPPIdentifier *ident) :
   _ident(ident),
   _ident(ident),
-  _bit_width(-1),
+  _bit_width(nullptr),
   _packed(false) {
   _packed(false) {
 }
 }
 
 

+ 2 - 2
dtool/src/cppparser/cppInstanceIdentifier.h

@@ -86,8 +86,8 @@ public:
   typedef std::vector<Modifier> Modifiers;
   typedef std::vector<Modifier> Modifiers;
   Modifiers _modifiers;
   Modifiers _modifiers;
 
 
-  // If not -1, indicates a bitfield
-  int _bit_width;
+  // If not null, indicates a bitfield
+  CPPExpression *_bit_width;
 
 
   // Indicates a parameter pack
   // Indicates a parameter pack
   bool _packed;
   bool _packed;

+ 15 - 11
dtool/src/parser-inc/map

@@ -24,19 +24,23 @@
 #include <stdcompare.h>
 #include <stdcompare.h>
 #include <pair>
 #include <pair>
 
 
-template<class key, class element, class compare = less<key> >
+namespace std {
+  template<class T> class allocator;
+}
+
+template<class Key, class Element, class Compare = less<Key>, class Allocator = std::allocator<pair<const Key, T> > >
 class map {
 class map {
 public:
 public:
-  typedef key key_type;
-  typedef element data_type;
-  typedef element mapped_type;
-  typedef pair<const key, element> value_type;
-  typedef compare key_compare;
-
-  typedef element *pointer;
-  typedef const element *const_pointer;
-  typedef element &reference;
-  typedef const element &const_reference;
+  typedef Key key_type;
+  typedef Element data_type;
+  typedef Element mapped_type;
+  typedef pair<const Key, Element> value_type;
+  typedef Compare key_compare;
+
+  typedef Element *pointer;
+  typedef const Element *const_pointer;
+  typedef Element &reference;
+  typedef const Element &const_reference;
 
 
   class iterator;
   class iterator;
   class const_iterator;
   class const_iterator;

+ 2 - 0
dtool/src/parser-inc/ostream

@@ -1,5 +1,7 @@
 #pragma once
 #pragma once
 
 
+#include <iosfwd>
+
 namespace std {
 namespace std {
   template<class CharT, class Traits>
   template<class CharT, class Traits>
   std::basic_ostream<CharT, Traits> &ends(std::basic_ostream<CharT, Traits> &os);
   std::basic_ostream<CharT, Traits> &ends(std::basic_ostream<CharT, Traits> &os);

+ 9 - 8
dtool/src/parser-inc/string

@@ -26,6 +26,7 @@
 
 
 namespace std {
 namespace std {
   template<class charT> struct char_traits;
   template<class charT> struct char_traits;
+  template<class T> class allocator;
 
 
   template<> struct char_traits<char> {
   template<> struct char_traits<char> {
     using char_type = char;
     using char_type = char;
@@ -51,7 +52,7 @@ namespace std {
     using state_type = mbstate_t;
     using state_type = mbstate_t;
   };
   };
 
 
-  template<class ctype>
+  template<class CharT, class Traits = std::char_traits<CharT>, class Allocator = std::allocator<CharT> >
   class basic_string {
   class basic_string {
   public:
   public:
     struct iterator;
     struct iterator;
@@ -63,17 +64,17 @@ namespace std {
     static const size_t npos = -1;
     static const size_t npos = -1;
 
 
     basic_string();
     basic_string();
-    basic_string(const basic_string<ctype> &copy);
-    void operator = (const basic_string<ctype> &copy);
-    basic_string(const ctype *string);
+    basic_string(const basic_string<CharT> &copy);
+    void operator = (const basic_string<CharT> &copy);
+    basic_string(const CharT *string);
     ~basic_string();
     ~basic_string();
 
 
-    const ctype *c_str() const;
+    const CharT *c_str() const;
     size_t length() const;
     size_t length() const;
 
 
-    ctype at(size_t pos) const;
-    ctype operator[](size_t pos) const;
-    ctype &operator[](size_t pos);
+    CharT at(size_t pos) const;
+    CharT operator[](size_t pos) const;
+    CharT &operator[](size_t pos);
   };
   };
 
 
   typedef basic_string<char> string;
   typedef basic_string<char> string;

+ 10 - 6
dtool/src/parser-inc/vector

@@ -22,17 +22,21 @@
 
 
 #include <stdtypedefs.h>
 #include <stdtypedefs.h>
 
 
+namespace std {
+  template<class T> class allocator;
+}
+
 inline namespace std {
 inline namespace std {
 
 
-template<class element>
+template<class T, class Allocator = std::allocator<T> >
 class vector {
 class vector {
 public:
 public:
-  typedef element value_type;
+  typedef T value_type;
 
 
-  typedef element *pointer;
-  typedef const element *const_pointer;
-  typedef element &reference;
-  typedef const element &const_reference;
+  typedef T *pointer;
+  typedef const T *const_pointer;
+  typedef T &reference;
+  typedef const T &const_reference;
 
 
   typedef pointer iterator;
   typedef pointer iterator;
   typedef const_pointer const_iterator;
   typedef const_pointer const_iterator;

+ 2 - 1
panda/src/collide/collisionPolygon.h

@@ -42,6 +42,8 @@ public:
 
 
   virtual CollisionSolid *make_copy();
   virtual CollisionSolid *make_copy();
 
 
+  static bool verify_points(const LPoint3 *begin, const LPoint3 *end);
+
 PUBLISHED:
 PUBLISHED:
   virtual LPoint3 get_collision_origin() const;
   virtual LPoint3 get_collision_origin() const;
 
 
@@ -53,7 +55,6 @@ PUBLISHED:
   INLINE static bool verify_points(const LPoint3 &a, const LPoint3 &b,
   INLINE static bool verify_points(const LPoint3 &a, const LPoint3 &b,
                                    const LPoint3 &c, const LPoint3 &d);
                                    const LPoint3 &c, const LPoint3 &d);
   static bool verify_points(const LPoint3 &a, const LPoint3 &b, const LPoint3 &c);
   static bool verify_points(const LPoint3 &a, const LPoint3 &b, const LPoint3 &c);
-  static bool verify_points(const LPoint3 *begin, const LPoint3 *end);
 
 
   bool is_valid() const;
   bool is_valid() const;
   bool is_concave() const;
   bool is_concave() const;

+ 3 - 3
panda/src/downloader/httpClient.I

@@ -111,9 +111,9 @@ get_verify_ssl() const {
  * Specifies the set of ciphers that are to be made available for SSL
  * Specifies the set of ciphers that are to be made available for SSL
  * connections.  This is a string as described in the ciphers(1) man page of
  * connections.  This is a string as described in the ciphers(1) man page of
  * the OpenSSL documentation (or see
  * the OpenSSL documentation (or see
- * https://www.openssl.org/docs/apps/ciphers.html ).  If this isn't specified,
- * the default is provided by the Config file.  You may also specify "DEFAULT"
- * to use the built-in OpenSSL default value.
+ * https://www.openssl.org/docs/man1.1.1/man1/ciphers.html ).  If this isn't
+ * specified, the default is provided by the Config file.  You may also specify
+ * "DEFAULT" to use the built-in OpenSSL default value.
  */
  */
 INLINE void HTTPClient::
 INLINE void HTTPClient::
 set_cipher_list(const std::string &cipher_list) {
 set_cipher_list(const std::string &cipher_list) {

+ 4 - 4
panda/src/grutil/meshDrawer2D.I

@@ -60,7 +60,7 @@ set_budget(int total_budget) {
 }
 }
 
 
 /**
 /**
- * Gets the total triangle budget of the drawer
+ * Gets the total triangle budget of the drawer.
  */
  */
 INLINE int MeshDrawer2D::
 INLINE int MeshDrawer2D::
 get_budget() {
 get_budget() {
@@ -68,7 +68,7 @@ get_budget() {
 }
 }
 
 
 /**
 /**
- * Sets clipping rectangle
+ * Sets the clipping rectangle.
  */
  */
 INLINE void MeshDrawer2D::
 INLINE void MeshDrawer2D::
 set_clip(PN_stdfloat x, PN_stdfloat y, PN_stdfloat w, PN_stdfloat h) {
 set_clip(PN_stdfloat x, PN_stdfloat y, PN_stdfloat w, PN_stdfloat h) {
@@ -79,7 +79,7 @@ set_clip(PN_stdfloat x, PN_stdfloat y, PN_stdfloat w, PN_stdfloat h) {
 }
 }
 
 
 /**
 /**
- * Draws a 2d rectangle.  Ignores the cliping rectangle
+ * Draws a 2D rectangle.  Ignores the clipping rectangle.
  */
  */
 INLINE void MeshDrawer2D::
 INLINE void MeshDrawer2D::
 quad_raw(const LVector3 &v1, const LVector4 &c1, const LVector2 &uv1,
 quad_raw(const LVector3 &v1, const LVector4 &c1, const LVector2 &uv1,
@@ -125,7 +125,7 @@ rectangle_raw(PN_stdfloat x, PN_stdfloat y, PN_stdfloat w, PN_stdfloat h,
 }
 }
 
 
 /**
 /**
- * Draws a 2d rectangle, that can be cliped
+ * Draws a 2D rectangle which can be clipped.
  */
  */
 INLINE void MeshDrawer2D::
 INLINE void MeshDrawer2D::
 rectangle(PN_stdfloat x, PN_stdfloat y, PN_stdfloat w, PN_stdfloat h,
 rectangle(PN_stdfloat x, PN_stdfloat y, PN_stdfloat w, PN_stdfloat h,

+ 2 - 2
panda/src/grutil/meshDrawer2D.h

@@ -39,8 +39,8 @@
 #include "nodePath.h"
 #include "nodePath.h"
 
 
 /**
 /**
- * This class allows the drawing of 2d objects - mainly based on quads and
- * rectangles.  Allows clipping and serverl high level UI theme functions.
+ * This class allows the drawing of 2D objects - mainly based on quads and
+ * rectangles.  It allows clipping and several high level UI theme functions.
  */
  */
 class EXPCL_PANDA_GRUTIL MeshDrawer2D : public TypedObject {
 class EXPCL_PANDA_GRUTIL MeshDrawer2D : public TypedObject {
 PUBLISHED:
 PUBLISHED:

+ 12 - 4
panda/src/nativenet/buffered_datagramconnection.h

@@ -136,7 +136,10 @@ private:
  * used to do a full reset of buffers
  * used to do a full reset of buffers
  */
  */
 inline void Buffered_DatagramConnection::ClearAll(void) {
 inline void Buffered_DatagramConnection::ClearAll(void) {
-  nativenet_cat.error() << "Buffered_DatagramConnection::ClearAll Starting Auto Reset\n";
+  if (nativenet_cat.is_debug()) {
+    nativenet_cat.debug()
+      << "Buffered_DatagramConnection::ClearAll Starting Auto Reset\n";
+  }
   Close();
   Close();
   _Writer.ReSet();
   _Writer.ReSet();
   _Reader.ReSet();
   _Reader.ReSet();
@@ -215,8 +218,11 @@ inline Buffered_DatagramConnection::~Buffered_DatagramConnection(void)
 inline Buffered_DatagramConnection::Buffered_DatagramConnection(int rbufsize, int wbufsize, int write_flush_point)
 inline Buffered_DatagramConnection::Buffered_DatagramConnection(int rbufsize, int wbufsize, int write_flush_point)
     :  _Writer(wbufsize,write_flush_point) , _Reader(rbufsize)
     :  _Writer(wbufsize,write_flush_point) , _Reader(rbufsize)
 {
 {
-  nativenet_cat.error() << "Buffered_DatagramConnection Constructor rbufsize = " << rbufsize
-                        << " wbufsize = " << wbufsize << " write_flush_point = " << write_flush_point << "\n";
+  if (nativenet_cat.is_debug()) {
+    nativenet_cat.debug()
+      << "Buffered_DatagramConnection Constructor rbufsize = " << rbufsize
+      << " wbufsize = " << wbufsize << " write_flush_point = " << write_flush_point << "\n";
+  }
 }
 }
 
 
 inline bool  Buffered_DatagramConnection::SendMessageBufferOnly(Datagram &msg)
 inline bool  Buffered_DatagramConnection::SendMessageBufferOnly(Datagram &msg)
@@ -289,7 +295,9 @@ bool Buffered_DatagramConnection::Flush(void)
  * Reset
  * Reset
  */
  */
 inline void Buffered_DatagramConnection::Reset() {
 inline void Buffered_DatagramConnection::Reset() {
-  nativenet_cat.error() << "Buffered_DatagramConnection::Reset()\n";
+  if (nativenet_cat.is_debug()) {
+    nativenet_cat.debug() << "Buffered_DatagramConnection::Reset()\n";
+  }
   ClearAll();
   ClearAll();
 }
 }
 
 

+ 7 - 5
panda/src/pgraph/geomNode.cxx

@@ -507,8 +507,10 @@ add_for_draw(CullTraverser *trav, CullTraverserData &data) {
       << " draw_mask = " << data._draw_mask << "\n";
       << " draw_mask = " << data._draw_mask << "\n";
   }
   }
 
 
+  Thread *current_thread = trav->get_current_thread();
+
   // Get all the Geoms, with no decalling.
   // Get all the Geoms, with no decalling.
-  Geoms geoms = get_geoms(trav->get_current_thread());
+  Geoms geoms = get_geoms(current_thread);
   int num_geoms = geoms.get_num_geoms();
   int num_geoms = geoms.get_num_geoms();
   trav->_geoms_pcollector.add_level(num_geoms);
   trav->_geoms_pcollector.add_level(num_geoms);
   CPT(TransformState) internal_transform = data.get_internal_transform(trav);
   CPT(TransformState) internal_transform = data.get_internal_transform(trav);
@@ -532,9 +534,9 @@ add_for_draw(CullTraverser *trav, CullTraverserData &data) {
     if (num_geoms > 1) {
     if (num_geoms > 1) {
       if (data._view_frustum != nullptr) {
       if (data._view_frustum != nullptr) {
         // Cull the individual Geom against the view frustum.
         // Cull the individual Geom against the view frustum.
-        CPT(BoundingVolume) geom_volume = geom->get_bounds();
+        CPT(BoundingVolume) geom_volume = geom->get_bounds(current_thread);
         const GeometricBoundingVolume *geom_gbv =
         const GeometricBoundingVolume *geom_gbv =
-          DCAST(GeometricBoundingVolume, geom_volume);
+          geom_volume->as_geometric_bounding_volume();
 
 
         int result = data._view_frustum->contains(geom_gbv);
         int result = data._view_frustum->contains(geom_gbv);
         if (result == BoundingVolume::IF_no_intersection) {
         if (result == BoundingVolume::IF_no_intersection) {
@@ -544,9 +546,9 @@ add_for_draw(CullTraverser *trav, CullTraverserData &data) {
       }
       }
       if (!data._cull_planes->is_empty()) {
       if (!data._cull_planes->is_empty()) {
         // Also cull the Geom against the cull planes.
         // Also cull the Geom against the cull planes.
-        CPT(BoundingVolume) geom_volume = geom->get_bounds();
+        CPT(BoundingVolume) geom_volume = geom->get_bounds(current_thread);
         const GeometricBoundingVolume *geom_gbv =
         const GeometricBoundingVolume *geom_gbv =
-          DCAST(GeometricBoundingVolume, geom_volume);
+          geom_volume->as_geometric_bounding_volume();
         int result;
         int result;
         data._cull_planes->do_cull(result, state, geom_gbv);
         data._cull_planes->do_cull(result, state, geom_gbv);
         if (result == BoundingVolume::IF_no_intersection) {
         if (result == BoundingVolume::IF_no_intersection) {

+ 6 - 0
panda/src/pgraph/pandaNode_ext.cxx

@@ -165,6 +165,12 @@ clear_python_tag(PyObject *key) {
   if (PyDict_GetItem(dict, key) != nullptr) {
   if (PyDict_GetItem(dict, key) != nullptr) {
     PyDict_DelItem(dict, key);
     PyDict_DelItem(dict, key);
   }
   }
+
+  if (PyDict_Size(dict) == 0 && Py_REFCNT(dict) == 1) {
+    // This was the last tag, and do_get_python_tags() made sure we have a
+    // unique reference to the tags, so clear the tag object.
+    _this->_python_tag_data.clear();
+  }
 }
 }
 
 
 /**
 /**

+ 5 - 5
panda/src/putil/bitArray.cxx

@@ -114,6 +114,11 @@ has_any_of(int low_bit, int size) const {
   ++w;
   ++w;
 
 
   while (size > 0) {
   while (size > 0) {
+    if ((size_t)w >= get_num_words()) {
+      // Now we're up to the highest bits.
+      return (_highest_bits != 0);
+    }
+
     if (size <= num_bits_per_word) {
     if (size <= num_bits_per_word) {
       // The remainder fits within one word of the array.
       // The remainder fits within one word of the array.
       return _array[w].has_any_of(0, size);
       return _array[w].has_any_of(0, size);
@@ -125,11 +130,6 @@ has_any_of(int low_bit, int size) const {
     }
     }
     size -= num_bits_per_word;
     size -= num_bits_per_word;
     ++w;
     ++w;
-
-    if (w >= (int)get_num_words()) {
-      // Now we're up to the highest bits.
-      return (_highest_bits != 0);
-    }
   }
   }
 
 
   return false;
   return false;

+ 3 - 0
pandatool/src/deploy-stub/deploy-stub.c

@@ -655,6 +655,9 @@ int main(int argc, char *argv[]) {
   PyImport_FrozenModules = blobinfo.pointers[0];
   PyImport_FrozenModules = blobinfo.pointers[0];
   retval = Py_FrozenMain(argc, argv);
   retval = Py_FrozenMain(argc, argv);
 
 
+  fflush(stdout);
+  fflush(stderr);
+
   unmap_blob(blob);
   unmap_blob(blob);
   return retval;
   return retval;
 }
 }

+ 0 - 1
samples/fireflies/light.sha

@@ -14,7 +14,6 @@ void vshader(float4 vtx_position : POSITION,
 }
 }
 
 
 void fshader(float4 l_pos: TEXCOORD0,
 void fshader(float4 l_pos: TEXCOORD0,
-             float4 l_scale: TEXCOORD1,
              uniform sampler2D k_texnormal : TEXUNIT0,
              uniform sampler2D k_texnormal : TEXUNIT0,
              uniform sampler2D k_texalbedo : TEXUNIT1,
              uniform sampler2D k_texalbedo : TEXUNIT1,
              uniform sampler2D k_texdepth  : TEXUNIT2,
              uniform sampler2D k_texdepth  : TEXUNIT2,

+ 29 - 0
tests/pgraph/test_nodepath.py

@@ -194,6 +194,35 @@ def test_nodepath_python_tags():
     assert rc1 == rc2
     assert rc1 == rc2
 
 
 
 
+def test_nodepath_clear_python_tag():
+    from panda3d.core import NodePath
+
+    path = NodePath("node")
+    assert not path.has_python_tag("a")
+    assert not path.has_python_tag("b")
+    assert not path.node().has_tags()
+
+    path.set_python_tag("a", "value")
+    assert path.has_python_tag("a")
+    assert not path.has_python_tag("b")
+    assert path.node().has_tags()
+
+    path.set_python_tag("b", "value")
+    assert path.has_python_tag("a")
+    assert path.has_python_tag("b")
+    assert path.node().has_tags()
+
+    path.clear_python_tag("a")
+    assert not path.has_python_tag("a")
+    assert path.has_python_tag("b")
+    assert path.node().has_tags()
+
+    path.clear_python_tag("b")
+    assert not path.has_python_tag("a")
+    assert not path.has_python_tag("b")
+    assert not path.node().has_tags()
+
+
 def test_nodepath_replace_texture():
 def test_nodepath_replace_texture():
     from panda3d.core import NodePath, Texture
     from panda3d.core import NodePath, Texture
 
 

+ 17 - 0
tests/putil/test_bitarray.py

@@ -123,3 +123,20 @@ def test_bitarray_pickle():
 
 
     ba = ~BitArray(94187049178237918273981729127381723)
     ba = ~BitArray(94187049178237918273981729127381723)
     assert ba == pickle.loads(pickle.dumps(ba, -1))
     assert ba == pickle.loads(pickle.dumps(ba, -1))
+
+
+def test_bitarray_has_any_of():
+    ba = BitArray()
+    assert not ba.has_any_of(100, 200)
+
+    ba = BitArray()
+    ba.set_range(0, 53)
+    assert ba.has_any_of(52, 1)
+    assert ba.has_any_of(52, 100)
+    assert not ba.has_any_of(53, 45)
+
+    ba = BitArray()
+    ba.invert_in_place()
+    assert ba.has_any_of(0, 1)
+    assert ba.has_any_of(53, 45)
+    assert ba.has_any_of(0, 100)

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.