<commit_before>diff -Naur SDL_ttf-2.0.10/SDL_ttf.c SDL_ttf-2.0.10.orig/SDL_ttf.c
--- SDL_ttf-2.0.10.orig/SDL_ttf.c	2012-07-21 16:47:06.000000000 +0200
+++ SDL_ttf-2.0.10/SDL_ttf.c	2009-10-19 10:18:05.000000000 +0200
@@ -1336,7 +1336,7 @@
 	palette->colors[1].r = fg.r;
 	palette->colors[1].g = fg.g;
 	palette->colors[1].b = fg.b;
-	SDL_SetColorKey( textbuf, SDL_SRCCOLORKEY, 0 );
+	SDL_SetColorKey( textbuf, SDL_TRUE, 0 );
 
 	/* check kerning */
 	use_kerning = FT_HAS_KERNING( font->face ) && font->kerning;
@@ -1461,7 +1461,7 @@
 	palette->colors[1].r = fg.r;
 	palette->colors[1].g = fg.g;
 	palette->colors[1].b = fg.b;
-	SDL_SetColorKey(textbuf, SDL_SRCCOLORKEY, 0);
+	SDL_SetColorKey(textbuf, SDL_TRUE, 0);
 
 	/* Copy the character from the pixmap */
 	src = glyph->bitmap.buffer;
<commit_msg>update sdl_ttf patch for SDL 2 (fix SDL_AllocSurface to SDL_CreateRGBSurface). closes #15<commit_after>diff -Naur SDL_ttf-2.0.10/SDL_ttf.c SDL_ttf-2.0.10.orig/SDL_ttf.c
--- SDL_ttf-2.0.10.orig/SDL_ttf.c	2012-07-21 16:47:06.000000000 +0200
+++ SDL_ttf-2.0.10/SDL_ttf.c	2009-10-19 10:18:05.000000000 +0200
@@ -1319,7 +1319,7 @@
	}
 
 	/* Create the target surface */
-	textbuf = SDL_AllocSurface(SDL_SWSURFACE, width, height, 8, 0, 0, 0, 0);
+	textbuf = SDL_CreateRGBSurface(SDL_SWSURFACE, width, height, 8, 0, 0, 0, 0);
 	if( textbuf == NULL ) {
 		return NULL;
 	}
@@ -1336,7 +1336,7 @@
 	palette->colors[1].r = fg.r;
 	palette->colors[1].g = fg.g;
 	palette->colors[1].b = fg.b;
-	SDL_SetColorKey( textbuf, SDL_SRCCOLORKEY, 0 );
+	SDL_SetColorKey( textbuf, SDL_TRUE, 0 );
 
 	/* check kerning */
 	use_kerning = FT_HAS_KERNING( font->face ) && font->kerning;
@@ -1461,7 +1461,7 @@
 	palette->colors[1].r = fg.r;
 	palette->colors[1].g = fg.g;
 	palette->colors[1].b = fg.b;
-	SDL_SetColorKey(textbuf, SDL_SRCCOLORKEY, 0);
+	SDL_SetColorKey(textbuf, SDL_TRUE, 0);
 
 	/* Copy the character from the pixmap */
 	src = glyph->bitmap.buffer;
@@ -1574,7 +1574,7 @@
 	}
 
 	/* Create the target surface */
-	textbuf = SDL_AllocSurface(SDL_SWSURFACE, width, height, 8, 0, 0, 0, 0);
+	textbuf = SDL_CreateRGBSurface(SDL_SWSURFACE, width, height, 8, 0, 0, 0, 0);
 	if( textbuf == NULL ) {
 		return NULL;
 	}
@@ -1831,7 +1831,7 @@
 	}
 
 	/* Create the target surface */
-	textbuf = SDL_AllocSurface(SDL_SWSURFACE, width, height, 32,
+	textbuf = SDL_CreateRGBSurface(SDL_SWSURFACE, width, height, 32,
 	                           0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000);
 	if ( textbuf == NULL ) {
 		return(NULL);

{'fraction_non_alphanumeric': 0.17560588001589195, 'fraction_numerical': 0.11323003575685339, 'mean_word_length': 3.603290676416819, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 4, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5433617', 'n_tokens_mistral': 1375, 'n_tokens_neox': 1110, 'n_words': 205}