Skip to content

Instantly share code, notes, and snippets.

View lucasmeijer's full-sized avatar

Lucas Meijer lucasmeijer

  • Unity Technologies
  • Amsterdam
View GitHub Profile
@lucasmeijer
lucasmeijer / pdb in release
Created March 8, 2011 17:49
pdb for libmono in releasemode
diff --git a/msvc/libmono.vcxproj b/msvc/libmono.vcxproj
index 36745e1..b5193cc 100644
--- a/msvc/libmono.vcxproj
+++ b/msvc/libmono.vcxproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
diff --git a/mcs/class/System/System.Net.Sockets/NetworkStream.cs b/mcs/class/System/System.Net.Socket$
index 29c5b8b..d0db8cb 100644
--- a/mcs/class/System/System.Net.Sockets/NetworkStream.cs
+++ b/mcs/class/System/System.Net.Sockets/NetworkStream.cs
@@ -32,9 +32,9 @@
using System.IO;
using System.Runtime.InteropServices;
+using System.Threading;
#if NET_2_0 && !NET_2_1
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
namespace UnityEngine.Serialization
{
/// <summary>
/// Serialization support for <see cref="List{T}" /> and <see cref="Dictionary{TKey,TValue}" /> that doesn't rely on reflection
/// of private members in order to be useable under the CoreCLR security model (WebPlayer).
Lucas-Meijers-MacBook-Pro-2:alchemy lucas$ hg status
M PlatformDependent/AlchemyPlayer/FlashTrampoline/SerializedFileContainer.as
M PlatformDependent/AlchemyPlayer/FlashTrampoline/UnitySprite.as
M Runtime/Mono/MonoBehaviour.h
M Runtime/Mono/MonoBehaviourSerialization.cpp
M Runtime/Scripting/AS3Utility.h
M Runtime/Serialize/CacheWrap.h
M Runtime/Serialize/TransferFunctions/StreamedBinaryRead.h
M Tools/cil2as/cil2as/cil2as.swc/UnityEngine/Serialization/SerializedStateReader.as
? 8611.achacks.exe.bc
package {
import UnityEngine.MonoBehaviour;
import UnityEngine.Debug;
import UnityEngine.Vector3;
import UnityEngine.Time;
import UnityEngine.Serialization.IDeserializable;
import UnityEngine.Serialization.SerializedStateReader;
public class NewBehaviourScript extends MonoBehaviour implements IDeserializable {
package UnityEngine {
import System.Enum;
public final class SubstanceType extends Enum {
public static const Boolean: SubstanceType = new SubstanceType("Boolean", 0);
public static const Float: SubstanceType = new SubstanceType("Float", 1);
you can do this:
struct HanfordsCombinedAudioSettings
{
AudioClip sound;
float volume;
int count;
}
and then in some monobehaviour:
invoking clang3.0 like this:
clang -emit-llvm test.c -o test.bc -c
on the wikipedia example program of stdarg.h (http://en.wikipedia.org/wiki/Stdarg.h)
----------------
#include <stdio.h>
#include <stdarg.h>
@lucasmeijer
lucasmeijer / gist:6554029
Created September 13, 2013 18:04
c++ template puzzle
template<class T> struct Converter {};
struct TheMagicTypeToFind {};
struct MyConverter : Converter<TheMagicTypeToFind> //I want to store the magic type here
{
void DoSomething();
};
template<class TMagic, class TConverter>
//PUZZLE: This code compiles, but requires an ugly double argumetn on line 27. How to change the code so
//this is not required, yet the TMagic type is still automatically deduced?
//
//- Dont want to make DoSomething virtual
//- compile with gcc -c test.cpp
template<class T> struct Converter {};
struct TheMagicTypeToFind {};