src/Objects.h
changeset 251 ca99a81745fe
parent 247 7721042bdb67
     1.1 --- a/src/Objects.h	Sat Dec 29 00:55:38 2012 -0800
     1.2 +++ b/src/Objects.h	Tue Jan 01 15:34:07 2013 -0800
     1.3 @@ -2,19 +2,19 @@
     1.4   *
     1.5   * Copyright (C) 2012 David Anderson
     1.6   *
     1.7 - * This file is part of JITCraft.
     1.8 + * This file is part of SourcePawn.
     1.9   *
    1.10 - * JITCraft is free software: you can redistribute it and/or modify it under
    1.11 + * SourcePawn is free software: you can redistribute it and/or modify it under
    1.12   * the terms of the GNU General Public License as published by the Free
    1.13   * Software Foundation, either version 3 of the License, or (at your option)
    1.14   * any later version.
    1.15   * 
    1.16 - * Foobar is distributed in the hope that it will be useful, but WITHOUT ANY
    1.17 + * SourcePawn is distributed in the hope that it will be useful, but WITHOUT ANY
    1.18   * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
    1.19   * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
    1.20   *
    1.21   * You should have received a copy of the GNU General Public License along with
    1.22 - * JITCraft. If not, see http://www.gnu.org/licenses/.
    1.23 + * SourcePawn. If not, see http://www.gnu.org/licenses/.
    1.24   */
    1.25  #ifndef _include_jitcraft_objects_h_
    1.26  #define _include_jitcraft_objects_h_
    1.27 @@ -57,6 +57,8 @@
    1.28      MapKind_Environment,
    1.29      MapKind_Descriptor,
    1.30      MapKind_Box,
    1.31 +    MapKind_Package,
    1.32 +    MapKind_List,
    1.33  
    1.34      // These do not have canonical maps.
    1.35      MapKind_Array,
    1.36 @@ -92,6 +94,10 @@
    1.37  
    1.38      inline void write(Zone *zone, Object **ptr, Object *value);
    1.39  
    1.40 +    static inline Object *cast(Object *obj) {
    1.41 +        return obj;
    1.42 +    }
    1.43 +
    1.44      static inline size_t offsetOfMap() {
    1.45          // Clang doesn't accept offsetof here and it's not clear why...
    1.46          return reinterpret_cast<size_t>(&((Object *)NULL)->map_);